[PATCH v2] test: check argc in symbol-test
authorJani Nikula <jani@nikula.org>
Wed, 23 Sep 2015 18:48:05 +0000 (21:48 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:35 +0000 (14:49 -0700)
d7/4b2365bf50860823e77ff88345fa6179bb2467 [new file with mode: 0644]

diff --git a/d7/4b2365bf50860823e77ff88345fa6179bb2467 b/d7/4b2365bf50860823e77ff88345fa6179bb2467
new file mode 100644 (file)
index 0000000..8071cc5
--- /dev/null
@@ -0,0 +1,98 @@
+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 arlo.cworth.org (Postfix) with ESMTP id 6D6096DE14C7\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 11:48:28 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.511\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.511 tagged_above=-999 required=5 tests=[AWL=0.209,\r
+  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 7gKYuTtNPpNL for <notmuch@notmuchmail.org>;\r
+ Wed, 23 Sep 2015 11:48:26 -0700 (PDT)\r
+Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com\r
+ [209.85.212.178])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 3CCEC6DE143A\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 11:48:26 -0700 (PDT)\r
+Received: by wiclk2 with SMTP id lk2so82769772wic.1\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 11:48:24 -0700 (PDT)\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:subject:date:message-id:in-reply-to\r
+ :references:mime-version:content-type:content-transfer-encoding;\r
+ bh=2X2skWhnRDLP2UKHwUhY8gxINdJM1zPRY7zMTKa4cmQ=;\r
+ b=HKyFl1vh5yXBp7ziTaT0vxo5ICp/anYAdDFbxLOzJIZ2ivoKiiIVUxLRwK88KMnizR\r
+ 1ih1OcKZ0+naF5zspdX+kxJZ+qpv2kiS1MGzbSh3iYuLmVXHV9GZolWOX6AyuUdrsNgB\r
+ iLHvoS/vxlXVoD/zQuG5ZHFZlRhXCm87ZfQKk7s9TxE3HeTHUpDJ77dVY2Hlj1dSLcgG\r
+ 9UIp3bdtpg/qFf+czF8lnvqIuV/d5Vln+J0ok8VZ2i4KByExm7YMLIXFu9SDeKKef9r/\r
+ 8ybhmk4YEoiJbH4mQRvV0Rumsc0JW7rKBrpqgDGqHYxH4uAwd7fLpdQEgbyhwcfVCJwI\r
+ dulg==\r
+X-Gm-Message-State:\r
+ ALoCoQlnDMaBvNi6aF3rhOGXsGiu6vLeLEoW+Fi+ZF1HoHFYavChK0sSsi9GiZF9rQZftb3nAoXW\r
+X-Received: by 10.194.24.68 with SMTP id s4mr12039185wjf.12.1443034104403;\r
+ Wed, 23 Sep 2015 11:48:24 -0700 (PDT)\r
+Received: from localhost (mobile-access-bcee4f-131.dhcp.inet.fi.\r
+ [188.238.79.131])\r
+ by smtp.gmail.com with ESMTPSA id i9sm8571634wjz.20.2015.09.23.11.48.22\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Wed, 23 Sep 2015 11:48:23 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>, Jani Nikula <jani@nikula.org>,\r
+ notmuch@notmuchmail.org\r
+Subject: [PATCH v2] test: check argc in symbol-test\r
+Date: Wed, 23 Sep 2015 21:48:05 +0300\r
+Message-Id: <1443034085-4358-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <87k2s2z9cb.fsf@zancas.localnet>\r
+References: <87k2s2z9cb.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Wed, 23 Sep 2015 18:48:28 -0000\r
+\r
+Check argc mainly to fix unused parameter warning:\r
+\r
+test/symbol-test.cc:7:14: warning: unused parameter ‘argc’ [-Wunused-parameter]\r
+  int main(int argc, char** argv) {\r
+               ^\r
+\r
+This makes more sense than telling the compiler it's unused on\r
+purpose.\r
+---\r
+ test/symbol-test.cc | 3 +++\r
+ 1 file changed, 3 insertions(+)\r
+\r
+diff --git a/test/symbol-test.cc b/test/symbol-test.cc\r
+index 77dbc1af44b2..7454838bfd31 100644\r
+--- a/test/symbol-test.cc\r
++++ b/test/symbol-test.cc\r
+@@ -8,6 +8,9 @@ int main (int argc, char** argv)\r
+     notmuch_database_t *notmuch;\r
+     char *message = NULL;\r
\r
++    if (argc != 3)\r
++      return 1;\r
++\r
+     if (notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_ONLY,\r
+                                      &notmuch, &message)) {\r
+       if (message) {\r
+-- \r
+2.1.4\r
+\r