]> Savannah Git Hosting - gnulib.git/commitdiff
error.c: correct printf-style format: %d -> %u
authorJim Meyering <meyering@fb.com>
Sun, 28 Jun 2015 17:38:46 +0000 (10:38 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 28 Jun 2015 17:38:46 +0000 (10:38 -0700)
* lib/error.c (error_at_line): Correct __fxprintf format to use %u,
rather than %d, to match the type of "line_number", unsigned int.

ChangeLog
lib/error.c

index 7ca6bf0e98f4afa3cdbf5b712a2e08f370623031..a318ce59008f6a6c94e92113b6cc8b5c5c3de97d 100644 (file)
--- 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
index 66831978fc98a51d62da67376c098459ebe07407..0ac769518533d757273c929a5008dbb57df490b3 100644 (file)
@@ -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