[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] error: conditionally empty format string.
From: |
Eric Blake |
Subject: |
Re: [PATCH] error: conditionally empty format string. |
Date: |
Fri, 25 Apr 2014 14:32:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 04/25/2014 01:56 PM, Mats Erik Andersson wrote:
> Hello there,
>
> a foolish use of "-Wformat=error" with gnulib uncovered
> a case of empty format strings in "lib/error.c". The use
> of clang with FreeBSD-11 uncovered this. It is seemingly
> the only format error from gnulib that affects Inetutils.
That's not a format error, but intentional. clang is being overly
noisy, and the conclusion is that you should not use that warning on
gnulib code.
>
> + if (file_name != NULL)
> #if _LIBC
> - __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
> - file_name, line_number);
> + __fxprintf (NULL, "%s:%d: ", file_name, line_number);
NACK. Your change loses the intentional space that was output when
file_name is NULL. Furthermore, we try to keep error.c somewhat in sync
with glibc; you'll have better luck if you can first get glibc to change
their code.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature