mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03: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:
1 parent
4e27c7372b
commit
97dcae2fb6
1 file changed
+5
-1
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user