From: Jim Meyering Date: Sun, 28 Jun 2015 17:38:46 +0000 (-0700) Subject: error.c: correct printf-style format: %d -> %u X-Git-Tag: v1.0~7031 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c3cf2ea4640b83ee201d6ef2fc180191f898b210;p=gnulib.git error.c: correct printf-style format: %d -> %u * lib/error.c (error_at_line): Correct __fxprintf format to use %u, rather than %d, to match the type of "line_number", unsigned int. --- diff --git a/ChangeLog b/ChangeLog index 7ca6bf0e98..a318ce5900 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-06-28 Jim Meyering + + error.c: correct printf-style format: %d -> %u + * lib/error.c (error_at_line): Correct __fxprintf format to use %u, + rather than %d, to match the type of "line_number", unsigned int. + 2015-06-25 Pádraig Brady fts: avoid reading beyond the heap allocation diff --git a/lib/error.c b/lib/error.c index 66831978fc..0ac7695185 100644 --- a/lib/error.c +++ b/lib/error.c @@ -379,10 +379,10 @@ error_at_line (int status, int errnum, const char *file_name, } #if _LIBC - __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", + __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ", file_name, line_number); #else - fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", + fprintf (stderr, file_name != NULL ? "%s:%u: " : " ", file_name, line_number); #endif