mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Avoid warning from shifting
This commit is contained in:
@ -237,9 +237,13 @@ INTERNAL_STATVFS (const char *name, struct STATVFS *buf,
|
||||
buf->f_files = fsbuf->f_files;
|
||||
buf->f_ffree = fsbuf->f_ffree;
|
||||
if (sizeof (buf->f_fsid) == sizeof (fsbuf->f_fsid))
|
||||
/* The shifting uses 'unsigned long long int' even though the target
|
||||
field might only have 32 bits. This is OK since the 'if' branch
|
||||
is not used in this case but the compiler would still generate
|
||||
warnings. */
|
||||
buf->f_fsid = ((fsbuf->f_fsid.__val[0]
|
||||
& ((1UL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
|
||||
| ((unsigned long int) fsbuf->f_fsid.__val[1]
|
||||
& ((1ULL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
|
||||
| ((unsigned long long int) fsbuf->f_fsid.__val[1]
|
||||
<< (8 * (sizeof (buf->f_fsid)
|
||||
- sizeof (fsbuf->f_fsid.__val[0])))));
|
||||
else
|
||||
|
Reference in New Issue
Block a user