Re: [PATCH 4/6] cli: intialize crypto structure in show and reply
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 18 May 2012 17:09:54 +0000 (13:09 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:13 +0000 (09:47 -0800)
88/ba12197379b150c03a08ad83d2e213bf0cd010 [new file with mode: 0644]

diff --git a/88/ba12197379b150c03a08ad83d2e213bf0cd010 b/88/ba12197379b150c03a08ad83d2e213bf0cd010
new file mode 100644 (file)
index 0000000..d15572e
--- /dev/null
@@ -0,0 +1,144 @@
+Return-Path: <dkg@fifthhorseman.net>\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 39777431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 18 May 2012 10:10:06 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\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 NWn-R6lopsqT for <notmuch@notmuchmail.org>;\r
+       Fri, 18 May 2012 10:10:05 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+       by olra.theworths.org (Postfix) with ESMTP id 83284431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 18 May 2012 10:10:05 -0700 (PDT)\r
+Received: from [192.168.23.207] (dsl254-070-154.nyc1.dsl.speakeasy.net\r
+       [216.254.70.154])\r
+       by che.mayfirst.org (Postfix) with ESMTPSA id 08889F970\r
+       for <notmuch@notmuchmail.org>; Fri, 18 May 2012 13:10:03 -0400 (EDT)\r
+Message-ID: <4FB68262.5010408@fifthhorseman.net>\r
+Date: Fri, 18 May 2012 13:09:54 -0400\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+User-Agent: Mozilla/5.0 (X11; Linux i686;\r
+       rv:10.0.3) Gecko/20120329 Icedove/10.0.3\r
+MIME-Version: 1.0\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH 4/6] cli: intialize crypto structure in show and reply\r
+References: <1337205359-2444-1-git-send-email-jrollins@finestructure.net>\r
+       <1337205359-2444-2-git-send-email-jrollins@finestructure.net>\r
+       <1337205359-2444-3-git-send-email-jrollins@finestructure.net>\r
+       <1337205359-2444-4-git-send-email-jrollins@finestructure.net>\r
+       <1337205359-2444-5-git-send-email-jrollins@finestructure.net>\r
+       <8762bvi70k.fsf@nikula.org>\r
+       <877gwaeve1.fsf@servo.finestructure.net>\r
+       <CAB+hUn9DdeaFj-hUNb_c1V3QLsbWjsE7_hpuOpDqWseayASdKQ@mail.gmail.com>\r
+       <87aa16daeq.fsf@servo.finestructure.net>\r
+       <4FB572DA.8040906@fifthhorseman.net> <87txzdew84.fsf@nikula.org>\r
+In-Reply-To: <87txzdew84.fsf@nikula.org>\r
+X-Enigmail-Version: 1.4.1\r
+Content-Type: multipart/signed; micalg=pgp-sha512;\r
+       protocol="application/pgp-signature";\r
+       boundary="------------enigCD3B1D6B7D91068EB0EB744D"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+Reply-To: notmuch <notmuch@notmuchmail.org>\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: Fri, 18 May 2012 17:10:06 -0000\r
+\r
+This is an OpenPGP/MIME signed message (RFC 2440 and 3156)\r
+--------------enigCD3B1D6B7D91068EB0EB744D\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 05/18/2012 04:20 AM, Jani Nikula wrote:\r
+> We have -Wextra, which enables -Wmissing-field-initializers, which\r
+> requires us to use full initialization of struct fields when doing\r
+> regular, non-designated initialization. The point is that you might\r
+> introduce subtle bugs if you added new struct fields and forgot to chec=\r
+k\r
+> the initializations. (This is why we have e.g. { 0, 0, 0, 0, 0 } instea=\r
+d\r
+> of just { 0 } in the initialization of notmuch_opt_desc_t arrays.)\r
+\r
+i think we can agree that this is the right choice.  We might even want\r
+to discourage non-designated initializations entirely.\r
+\r
+> IMHO the whole point of designated initializers is that the\r
+> initialization is not vulnerable to struct changes, and you can pick\r
+> which fields you choose to initialize explicitly. Also, it has the adde=\r
+d\r
+> benefit of documenting the fields that are initialized, without having\r
+> to look at the struct definition.\r
+\r
+Agreed.\r
+\r
+> Do we now want to initialize all struct fields explicitly, everywhere,\r
+> even when using designated initializers? Isn't that the question then?\r
+\r
+I'm not sure it has to be this dramatic and "all or nothing".  For\r
+example, it could be reasonable to explicitly initialize some subobjects\r
+and not others.  For example, the notmuch_crypto_t jamie is proposing\r
+would effectively encode the default setting for the --verify and\r
+--decrypt flags.  I could see wanting to explicitly initialize those\r
+default policy choices, even if they happen to be identical to the\r
+implicit "zero"ing.\r
+\r
+> Won't that maintain and promote the misconception that explicit\r
+> initialization is required, when it's really not, failing to educate th=\r
+e\r
+> non-experts and planting a seed of doubt in the experts...?\r
+\r
+i see your point here, which is why i'm not arguing that all subobjects\r
+need to be explicitly initialized all the time.\r
+\r
+> It's not always clear whether something is a matter of taste, style, or=\r
+\r
+> language paradigm. If it feels like a paradigm, sticking with it\r
+> ultimately benefits *both* perspectives.\r
+\r
+yep, understood.\r
+\r
+       --dkg\r
+\r
+\r
+--------------enigCD3B1D6B7D91068EB0EB744D\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+Content-Disposition: attachment; filename="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\r
+\r
+iQJ8BAEBCgBmBQJPtoJoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD\r
+Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznprlQQAJZm0916WkpKy1xSzXu1UlEJ\r
+4L1HSEf27PhnF09cwM0acCjsAYMFKC2ts9semIrKujU68OwVNKauAyMQ8FgDc7n0\r
+yNPfz4PjvifTNpDJkUlryS4wSUVtAv6RUVei0QnjmpzR3EWsXZ3Xs+XMp/MC8mt9\r
+VqNu7HRFBa/0u7A6WMd16Yy5PpYkT/EkaS3d+Y1LjcPhVXBN0pVYfQiRE5Xdt7KO\r
+kFC17xhsgYC70h0PQfjCLwbj9u7yew+59R3wMU0H+cWYvFXfeX5dOjYjUluV/jSB\r
+sEwkCmC9YHWzZELLv0BzdoXnidfUMf7yUbJoHLYTyKM//lcvuJc+Sp3WRljzxKiQ\r
+JmPekHlbNIoMmFMobwmE7MpRjcoxB7sG2bp318FbFRO0I2py8ZbQGWfgpVaZ55JO\r
+HnLpQ4Jn+aVeL1K9a4uWhzI2ONS1ygWbv2I1v7I01xgqNEe54rk3o9UQjYq+en/B\r
+8xp9HnIRdMgtRKFQnS1XzEZMTN7HSReCQscbCv5dIMCXsdoqDvJulXWKrIvpaXI3\r
+2zFRHkV42AsWRsu4tDtP87q1G/xEHSbbU2AbOJolXrgxfowvv/d6h5kkvfAH8s7U\r
+SifvEQn/FdEy7jZqjPNWu9t4ipYS+/XBkQsf7szQre3bbXV2JmHGFOFzIGpvGKed\r
+xRI1B1/LlSGw/52duuWE\r
+=uptl\r
+-----END PGP SIGNATURE-----\r
+\r
+--------------enigCD3B1D6B7D91068EB0EB744D--\r