# HG changeset patch # User Jim Meyering # Date 1435513126 25200 # Node ID 870a2ccf6d6ffdf3232f605e3dda5f6bfa61817b # Parent 1a086f523d28d92cbfcaf0d9a8650cd7eca8c844 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 --- 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 --- a/lib/error.c +++ b/lib/error.c @@ -379,10 +379,10 @@ } #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