From: Jim Meyering Date: Mon, 2 Jan 2012 20:28:15 +0000 (+0100) Subject: build: tail: avoid type/format mismatch warning from gcc X-Git-Tag: v8.15~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a189ae0ce8b34aa5f2dd15ccb3aaf33459cbb1c;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/tail.c b/src/tail.c index 41817e4dc6..eae57415e3 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;