From c3cf2ea4640b83ee201d6ef2fc180191f898b210 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 28 Jun 2015 10:38:46 -0700 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/error.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.5