xfsprogs: fix a couple 32-bit build warnings
PATCH 1/1 xfsprogs: fix a couple 32-bit build warnings
on 32-bit builds:
mremap_f can't turn a long long into a pointer, and dump_dirent needs proper %llx & a cast for u64 args as is done elsewhere.
Signed-off-by Eric Sandeen <[email protected]>
---
io/mmap.c +2 -2
@@ -628,8 +628,8 @@ mremap_f(switch (c) {case 'f' : flags =MREMAP_FIXED |MREMAP_MAYMOVE ; - new_addr = (void *)cvtnum (blocksize, sectsize, - optarg); + new_addr = (void *)(unsigned long )cvtnum (blocksize, + sectsize, optarg);break ;case 'm' : flags =MREMAP_MAYMOVE ;
io/readdir.c +3 -2
@@ -71,9 +71,10 @@ dump_dirent( long long offset, struct dirent *dirent) { - printf("%08llx: d_ino: 0x%08lx", offset, dirent->d_ino); + printf("%08llx: d_ino: 0x%08llx", offset, + (unsigned long long)dirent->d_ino);#ifdef _DIRENT_HAVE_D_OFF -printf (" d_off: 0x%08lx" , dirent->d_off); +printf (" d_off: 0x%08llx" , (unsigned long long )dirent->d_off);#endif #ifdef _DIRENT_HAVE_D_RECLENprintf (" d_reclen: 0x%x" , dirent->d_reclen);
Quoted 8 lines · Eric Sandeen
on 32-bit builds:
mremap_fcan't turn a long long into a pointer, anddump_direntneeds proper %llx & a cast for u64 args as is done elsewhere.Signed-off-by Eric Sandeen <[email protected]>---
Looks Ok to me:
Reviewed-by Brian Foster <[email protected]>
Quoted 38 lines
io/mmap.c +2
-2@@ -628,8 +628,8 @@ mremap_f(switch (c) {case 'f' : flags =MREMAP_FIXED |MREMAP_MAYMOVE ; - new_addr = (void *)cvtnum (blocksize, sectsize, - optarg); + new_addr = (void *)(unsigned long )cvtnum (blocksize, + sectsize, optarg);break ;case 'm' : flags =MREMAP_MAYMOVE ;io/readdir.c +3
-3@@ -71,9 +71,10 @@ dump_dirent( long long offset, struct dirent *dirent) { - printf("%08llx: d_ino: 0x%08lx", offset, dirent->d_ino); + printf("%08llx: d_ino: 0x%08llx", offset, + (unsigned long long)dirent->d_ino);#ifdef _DIRENT_HAVE_D_OFF -printf (" d_off: 0x%08lx" , dirent->d_off); +printf (" d_off: 0x%08llx" , (unsigned long long )dirent->d_off);#endif #ifdef _DIRENT_HAVE_D_RECLENprintf (" d_reclen: 0x%x" , dirent->d_reclen); --To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html