diff options
author | Jim Meyering <jim@meyering.net> | 2001-08-10 08:13:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-08-10 08:13:03 +0000 |
commit | 97dcae2fb626e4d998113f5e0c8a33af9a55b0ce (patch) | |
tree | b3f52caeca7ec851576866506b9913e11e11120b /src | |
parent | 4e27c7372b880f1c2b94960bd630f03f3d437a2f (diff) | |
download | coreutils-97dcae2fb626e4d998113f5e0c8a33af9a55b0ce.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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, |