diff options
author | Pádraig Brady <P@draigBrady.com> | 2012-12-19 23:58:10 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2012-12-21 15:57:04 +0000 |
commit | 8220a17c93c8546b409587f0f6215337b498722d (patch) | |
tree | 82fc169ecd4175007d9885b012eea2cd287df7d8 | |
parent | 76f606a9544bd67629bd4766ff6efe8bf42b20d9 (diff) | |
download | coreutils-8220a17c93c8546b409587f0f6215337b498722d.tar.xz |
dd: fix a printf format mismatch in an error message
* src/dd.c (dd_copy): To print an off_t portably we need
to use PRIdMAX and cast to intmax_t, otherwise there
could be a mismatch between say a 32 bit off_t
and uintmax_t. This was flagged by -Wformat on
a 64 bit host when compiling with CFLAGS=-m32.
-rw-r--r-- | src/dd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2130,9 +2130,9 @@ dd_copy (void) if (ftruncate (STDOUT_FILENO, output_offset) != 0) { error (0, errno, - _("failed to truncate to %"PRIuMAX" bytes" + _("failed to truncate to %" PRIdMAX " bytes" " in output file %s"), - output_offset, quote (output_file)); + (intmax_t) output_offset, quote (output_file)); return EXIT_FAILURE; } } |