1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-28 19:39:52 +02:00

(print_long_format): Multiply the shift width by zero

to avoid a warning from gcc on hosts with an unsigned type for the
st_size member.
This commit is contained in:
Jim Meyering
2001-08-10 08:13:03 +00:00
parent 4e27c7372b
commit 97dcae2fb6
+5 -1
View File
@@ -2644,7 +2644,11 @@ print_long_format (const struct fileinfo *f)
are actually positive values that have wrapped around. */
if (sizeof f->stat.st_size < sizeof size)
size += ((uintmax_t) (f->stat.st_size < 0)
<< (sizeof f->stat.st_size * CHAR_BIT));
<< (sizeof f->stat.st_size * CHAR_BIT
/* This final term has no effect other than to suppress
a warning about the shift count being larger than the
width of the type. */
* (sizeof f->stat.st_size < sizeof size)));
sprintf (p, "%8s ",
human_readable (size, hbuf, 1,