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:
@@ -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