From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0523F429E25 for ; Sat, 29 Oct 2011 10:30:57 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.79 X-Spam-Level: X-Spam-Status: No, score=-0.79 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, T_MIME_NO_TEXT=0.01] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JGW85PZFnIng for ; Sat, 29 Oct 2011 10:30:55 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 00703431FB6 for ; Sat, 29 Oct 2011 10:30:54 -0700 (PDT) Received: by faai28 with SMTP id i28so5022170faa.26 for ; Sat, 29 Oct 2011 10:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=YfZkQZErrAfsUY1nDfCJf7sDjB2iTkq5OpTRqRsVPZo=; b=V38+6/2eqhO9yLusqZbBRcUPW6UOsItK0wNgUFQbF2ye/x9zJaYn2OGqhrrIu8cBUi K74PwLHNSc23RPKvwjoD7cVTONncA8zV4a439/hDNn3MX1s34GVNKiv7c4W4OkRHJR1G oZkoq8mdMknt1Ys2lvOwTVcyjhD8JkFSw4TDc= Received: by 10.223.14.140 with SMTP id g12mr15118901faa.34.1319909453611; Sat, 29 Oct 2011 10:30:53 -0700 (PDT) Received: from localhost (dslb-178-004-066-018.pools.arcor-ip.net. [178.4.66.18]) by mx.google.com with ESMTPS id c13sm25564571fai.3.2011.10.29.10.30.51 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 29 Oct 2011 10:30:52 -0700 (PDT) From: Daniel Schoepe To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [RFC PATCH 2/3] cli: add support for limiting the number of search results In-Reply-To: References: User-Agent: Notmuch/0.9+47~g3dfd481 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Sat, 29 Oct 2011 19:30:50 +0200 Message-ID: <87mxcjk8mt.fsf@gilead.invalid> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: amdragon@mit.edu X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 17:30:57 -0000 --=-=-= On Fri, 28 Oct 2011 23:59:30 +0300, Jani Nikula wrote: > @@ -412,6 +413,14 @@ notmuch_search_command (void *ctx, int argc, char *argv[]) > fprintf (stderr, "Invalid value for --sort: %s\n", opt); > return 1; > } > + } else if (STRNCMP_LITERAL (argv[i], "--maxitems=") == 0) { > + const char *p; > + opt = argv[i] + sizeof ("--maxitems=") - 1; > + maxitems = strtoul(opt, &p, 10); p should be of type `char *', not `const char *', as it will be modified by strtoul. (Otherwise, gcc will produce a warning about this). Cheers, Daniel --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJOrDhKAAoJEIaTAtce+Z+JvC8P/juyuCdlTwNNXaTftnUrczcH 1c+PHmqzHxt1EMvl6rqF92Aeb1G9XnwW4qMaQu6id3w24dA+ii0aOIDCaaNodyID o63bNPmtzrv+flqr9farsJ9z14Y2D5siMGmYupAQf1YBgrpOupDCkk6+IlCZdKN1 LU4G64B5w58ofZnPSo75O9BLbW2jKCx7pH9NiC0DtcxJgs6vUR4CP7LVrVPQpA2X Cei0UMkwVxE2oWB9zSiLFNJaozDEHzvgXqOimFejG5ldOHvYCPVtYmfNibN5z2bE 5jwYfJGtZ3qUD1+/aldT3hiLkmTi6efywcISqRJRKFdUxhVlv3SPvcsMG9D7M6iH EmKGilTabk/vzMwpWaHgxtBOS3c1DqFZDXognbGAZj7ycYK642sB1+bmeFSuL7FX wN/NI6+aQtxwcWkHcwF9LgFVA+fA/eE4pIQl2ZbqM23dZ4Mx8F5dQMqztMhHiEXZ lrpS1cfsNDuphKil5Qnfd81u6Sn6AyfKB2ZDKKfBkns8KhuhpvrqsgFRrsZ+pHTr NPIiM1rsMhkEWINo5YcQzT7pi/xJ57oUPYdSeXJf/u5l8Ag8Hm1XuqNXGq+OMoBR 78OLEefR/EIF1A0zZ1KpU/k6sQ6JeApN1wSUHLul1cPfhKO8bZcMWFCd8aLof6Bt 2NxBUVodbEYAFjCL8t7K =74/M -----END PGP SIGNATURE----- --=-=-=--