changeset 18027:870a2ccf6d6f

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.
author Jim Meyering <meyering@fb.com>
date Sun, 28 Jun 2015 10:38:46 -0700
parents 1a086f523d28
children 4b0e76619c7f
files ChangeLog lib/error.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-28  Jim Meyering  <meyering@fb.com>
+
+	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  <P@draigBrady.com>
 
 	fts: avoid reading beyond the heap allocation
--- 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