[PATCH 3/3] cli: fix clang build warnings
authorJani Nikula <jani@nikula.org>
Mon, 23 Feb 2015 16:56:16 +0000 (18:56 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:07 +0000 (14:48 -0700)
03/99aa8b3a9e53b7317a19ccd27aef2f354ae8e2 [new file with mode: 0644]

diff --git a/03/99aa8b3a9e53b7317a19ccd27aef2f354ae8e2 b/03/99aa8b3a9e53b7317a19ccd27aef2f354ae8e2
new file mode 100644 (file)
index 0000000..9da6a8a
--- /dev/null
@@ -0,0 +1,109 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 09618431E62\r
+       for <notmuch@notmuchmail.org>; Mon, 23 Feb 2015 09:04:26 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.738\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ZHfCUGRtcqcG for <notmuch@notmuchmail.org>;\r
+       Mon, 23 Feb 2015 09:04:24 -0800 (PST)\r
+Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com\r
+       [209.85.212.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 60C02431FD9\r
+       for <notmuch@notmuchmail.org>; Mon, 23 Feb 2015 09:04:21 -0800 (PST)\r
+Received: by mail-wi0-f174.google.com with SMTP id em10so19270315wid.1\r
+       for <notmuch@notmuchmail.org>; Mon, 23 Feb 2015 08:56:04 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+       :references;\r
+       bh=Z50C3M6oDYX1vbDKJxO5Sy4mPH9dAbDYP+hM1nR7USw=;\r
+       b=BtaAf3Af49W1i1aC5qe5w7jMoSD7oA9ZuY2NynD6o7AIvYErPD2oXcceaZIwMZGirw\r
+       SHNWo/7cwelM1vKfWIhryxPe/J+pkLz8EC4bK6X4B0y6Iq1PscEqJSIYGd+vqbOSVZyQ\r
+       qQh6IjXK6mjLBJc7B4nxTS95dWtQWkBKglmFkBpRuYuCTyf4ypSZZS65owEW9Lr2jj1c\r
+       5yjdpsaWf3qKvQimaxOOI/9p3or23Gr/FizhV3Ua32irtVeyQMkyI17g43ZwLh8DSpMt\r
+       89cvLnYTztc26qHICA57hYhboQ9qphxT8WR47De0px+1buU7GHKUp3hnbc083iCrJWMW\r
+       HJbg==\r
+X-Gm-Message-State:\r
+ ALoCoQlmRUTrjo1ReHWAuxHSRGkArrofJOsXL9i137xqBppcTkgpanSphI+HbjBSj4vR/7D+UXye\r
+X-Received: by 10.181.8.225 with SMTP id dn1mr22893838wid.55.1424710563878;\r
+       Mon, 23 Feb 2015 08:56:03 -0800 (PST)\r
+Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi.\r
+       [188.238.59.76]) by mx.google.com with ESMTPSA id\r
+       e18sm56355079wjz.27.2015.02.23.08.56.02\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Mon, 23 Feb 2015 08:56:03 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/3] cli: fix clang build warnings\r
+Date: Mon, 23 Feb 2015 18:56:16 +0200\r
+Message-Id: <1424710576-30468-3-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1424710576-30468-1-git-send-email-jani@nikula.org>\r
+References: <1424710576-30468-1-git-send-email-jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 23 Feb 2015 17:04:26 -0000\r
+\r
+Fix the following warning produced by clang 3.5.0:\r
+\r
+notmuch-search.c:730:25: warning: initializing 'void *' with an\r
+expression of type 'const notmuch_opt_desc_t (*)[4]' discards\r
+qualifiers [-Wincompatible-pointer-types-discards-qualifiers]\r
+        { NOTMUCH_OPT_INHERIT, &common_options, NULL, 0, 0 },\r
+                               ^~~~~~~~~~~~~~~\r
+1 warning generated.\r
+\r
+---\r
+\r
+I'm not really happy with this one. An alternative would be to drop\r
+const from common_options, but I'm not happy with that either. And I'm\r
+not happy with the warning. :(\r
+---\r
+ notmuch-search.c | 4 ++--\r
+ 1 file changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/notmuch-search.c b/notmuch-search.c\r
+index 14b9f01c5ad1..a591d45b4c39 100644\r
+--- a/notmuch-search.c\r
++++ b/notmuch-search.c\r
+@@ -671,7 +671,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
+       { NOTMUCH_OPT_INT, &ctx->offset, "offset", 'O', 0 },\r
+       { NOTMUCH_OPT_INT, &ctx->limit, "limit", 'L', 0  },\r
+       { NOTMUCH_OPT_INT, &ctx->dupe, "duplicate", 'D', 0  },\r
+-      { NOTMUCH_OPT_INHERIT, &common_options, NULL, 0, 0 },\r
++      { NOTMUCH_OPT_INHERIT, (void *) &common_options, NULL, 0, 0 },\r
+       { 0, 0, 0, 0, 0 }\r
+     };\r
\r
+@@ -727,7 +727,7 @@ notmuch_address_command (notmuch_config_t *config, int argc, char *argv[])\r
+         (notmuch_keyword_t []){ { "true", NOTMUCH_EXCLUDE_TRUE },\r
+                                 { "false", NOTMUCH_EXCLUDE_FALSE },\r
+                                 { 0, 0 } } },\r
+-      { NOTMUCH_OPT_INHERIT, &common_options, NULL, 0, 0 },\r
++      { NOTMUCH_OPT_INHERIT, (void *) &common_options, NULL, 0, 0 },\r
+       { 0, 0, 0, 0, 0 }\r
+     };\r
\r
+-- \r
+2.1.4\r
+\r