git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] Makefile: add a DEVOPTS flag to get pedantic compilation

From
Beat Bolli <dev+git@drbeat.li>
Date
Jul 25, 2018, 17:38 UTC
Message-ID
<504f6cfe-f869-97f6-248d-642ae1e6dfc0@drbeat.li>
In-Reply-To
<xmqqzhyfuub6.fsf@gitster-ct.c.googlers.com>
On 25.07.18 18:57, Junio C Hamano wrote:
Show 17 quoted lines
> Beat Bolli <dev+git@drbeat.li> writes:
> 
>> In the interest of code hygiene, make it easier to compile Git with the
>> flag -pedantic.
>>
>> Pure pedantic compilation with GCC 7.3 results in one warning per use of
>> the translation macro `N_`:
>>
>>     warning: array initialized from parenthesized string constant [-Wpedantic]
>>
>> Therefore also disable the parenthesising of i18n strings with
>> -DUSE_PARENS_AROUND_GETTEXT_N=0.
>>
>> Signed-off-by: Beat Bolli <dev+git@drbeat.li>
>> ---
> 
> Hmph, what did you change between v3 and v4?
Just the commit text. In v3, it still said =No instead of =0.
Show 17 quoted lines
>> diff --git a/Makefile b/Makefile
>> index 0cb6590f24..2bfc051652 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -484,6 +484,12 @@ all::
> 
> The postimage of this hunk is supposed to be 11 lines long, as you
> have five additional line in the middle of 6 original context lines.
> Where did this 12 come from?  I am only interested in finding out if
> our patch generation tool(s) have some bugs with this question.
> 
> If this is only because you hand-edit your patch, then we have no
> tool breakage to worry about, but please refrain from doing so in
> the future (instead always go back to the commit, amend it, and
> re-run format-patch).
> 
> Thanks.
You got me there :-/
Won't happen again, sorry.
Show 12 quoted lines
>>  #        The DEVELOPER mode enables -Wextra with a few exceptions. By
>>  #        setting this flag the exceptions are removed, and all of
>>  #        -Wextra is used.
>> +#
>> +#    pedantic:
>> +#
>> +#        Enable -pedantic compilation. This also disables
>> +#        USE_PARENS_AROUND_GETTEXT_N to produce only relevant warnings.
>>  
>>  GIT-VERSION-FILE: FORCE
>>  	@$(SHELL_PATH) ./GIT-VERSION-GEN
> 
Previous: Junio C Hamano
Message 8 of 8 in “Makefile: add a DEVOPTS flag to get pedantic compilation”
  1. Makefile: add a DEVOPTS flag to get pedantic compilationBeat Bolli, Jul 21, 2018
  2. Junio C HamanoJul 23, 2018
  3. Beat BolliJul 24, 2018
  4. Junio C HamanoJul 24, 2018
  5. Makefile: add a DEVOPTS flag to get pedantic compilationBeat Bolli, Jul 24, 2018
  6. Makefile: add a DEVOPTS flag to get pedantic compilationBeat Bolli, Jul 24, 2018
  7. Junio C HamanoJul 25, 2018
  8. Beat BolliJul 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.