diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-02 21:28:15 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-02 22:35:36 +0100 |
commit | 3a189ae0ce8b34aa5f2dd15ccb3aaf33459cbb1c (patch) | |
tree | 734df2777a0fd7633a77a5020b290e67a0bf705c | |
parent | 794e52b7bd84a860d5606b70265cefdde839b7c3 (diff) | |
download | coreutils-3a189ae0ce8b34aa5f2dd15ccb3aaf33459cbb1c.tar.xz |
build: tail: avoid type/format mismatch warning from gcc
Without this change, gcc's -Werror=format would complain that
the '%lx' format requires 'long unsigned int', not 'int'.
* src/tail.c (fremote): Use a temporary variable.
-rw-r--r-- | src/tail.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tail.c b/src/tail.c index 41817e4dc..eae57415e 100644 --- a/src/tail.c +++ b/src/tail.c @@ -903,10 +903,13 @@ fremote (int fd, const char *name) case 0: break; case -1: - error (0, 0, _("unrecognized file system type 0x%08lx for %s. " - "please report this to %s. reverting to polling"), - buf.f_type, quote (name), PACKAGE_BUGREPORT); - /* Treat as "remote", so caller polls. */ + { + unsigned long int fs_type = buf.f_type; + error (0, 0, _("unrecognized file system type 0x%08lx for %s. " + "please report this to %s. reverting to polling"), + fs_type, quote (name), PACKAGE_BUGREPORT); + /* Treat as "remote", so caller polls. */ + } break; case 1: remote = false; |