{"thread":{"id":"25533","subject":"[PATCH] CodingGuidelines: add a note to help contributors catch some errors earlier.","startedAt":"2010-10-23T14:17:14Z","lastAt":"2010-10-23T18:48:30Z","messageCount":3,"participants":["Yann Dirson","Thiago Farina"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"154243","messageId":"1287843434-10890-1-git-send-email-ydirson@altern.org","threadId":"25533","inReplyTo":null,"subject":"[PATCH] CodingGuidelines: add a note to help contributors catch some errors earlier.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2010-10-23T14:17:14Z","receivedAt":"2010-10-23T14:17:14Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"It is a bit of a shame to wait for other's review before noticing\ndecl-after-stmt situations, whereas a quick check could have found it.\nThere are probably a number of other autoamted checks which could be\ndescribed here, but that's a start.\n\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n---\n Documentation/CodingGuidelines |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex 09ffc46..7ecd4f3 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -139,3 +139,8 @@ For C programs:\n \n  - When we pass <string, length> pair to functions, we should try to\n    pass them in that order.\n+\n+ - C code is expected to compile when the build is launched with the\n+   following command:\n+\n+   make CFLAGS=\"-Wall -Wdeclaration-after-statement -Werror\"\n-- \n1.7.2.3\n"},{"id":"154259","messageId":"AANLkTikCr5yRHzetY9-T=_rg+PZM-e8ZnQvL79ucws+6@mail.gmail.com","threadId":"25533","inReplyTo":"1287843434-10890-1-git-send-email-ydirson@altern.org","subject":"Re: [PATCH] CodingGuidelines: add a note to help contributors catch some errors earlier.","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2010-10-23T17:11:19Z","receivedAt":"2010-10-23T17:11:19Z","isPatch":true,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Sat, Oct 23, 2010 at 12:17 PM, Yann Dirson <ydirson@altern.org> wrote:\n> + - C code is expected to compile when the build is launched with the\n> +   following command:\n> +\n> +   make CFLAGS=\"-Wall -Wdeclaration-after-statement -Werror\"\n\nWhy this is not in the Makefile by default? Also -Wall is already in\nthe Makefile.\n"},{"id":"154267","messageId":"20101023184830.GQ4983@home.lan","threadId":"25533","inReplyTo":"AANLkTikCr5yRHzetY9-T=_rg+PZM-e8ZnQvL79ucws+6@mail.gmail.com","subject":"Re: [PATCH] CodingGuidelines: add a note to help contributors catch some errors earlier.","fromName":"Yann Dirson","fromEmail":"ydirson@free.fr","sentAt":"2010-10-23T18:48:30Z","receivedAt":"2010-10-23T18:48:30Z","isPatch":true,"sender":{"key":"ydirson@free.fr","avatar":null},"body":"On Sat, Oct 23, 2010 at 03:11:19PM -0200, Thiago Farina wrote:\n> On Sat, Oct 23, 2010 at 12:17 PM, Yann Dirson <ydirson@altern.org> wrote:\n> > + - C code is expected to compile when the build is launched with the\n> > +   following command:\n> > +\n> > +   make CFLAGS=\"-Wall -Wdeclaration-after-statement -Werror\"\n> \n> Why this is not in the Makefile by default? Also -Wall is already in\n> the Makefile.\n\nCFLAGS seems to be used for more than gcc, and -Wall seems to be\nportable enough to be overriden only in a couple of cases.  It would\nnot be the same for those flags.\n\nAlso note that -Wdeclaration-after-statement is also mentionned in\nSubmittingPatches, but I still think it is a better place in\nCodingGuidelines, which contributers are most likely to use as a\nchecklist before publishing.\n"}]}