Re: [PATCH] rebase-interactive.c: silence format-zero-length warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alban Gruin <alban.gruin@xxxxxxxxx> writes:

>> Fixes the following warnings:
>> 
>> rebase-interactive.c: In function ‘edit_todo_list’:
>> rebase-interactive.c:137:38: warning: zero-length gnu_printf format string [-Wformat-zero-length]
>>     write_file(rebase_path_dropped(), "");
>> rebase-interactive.c:144:37: warning: zero-length gnu_printf format string [-Wformat-zero-length]
> ...
> On a tangent: what's wrong with empty format strings?

Those functions that are truly printf-like, such a call would be
no-op and an indication of possible typo ("did you forget a %s or
something?"), I presume.

But many of our functions that take printf-like format strings will
do useful things even when an empty string is given, so the warning
is unwanted.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux