mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-16 08:44:31 +08:00
btrfs-progs: fix 32bit int/pointer cast warnings
This uses uintptr_t to cast pointers to u64 ioctl arguments to silence some 32bit build warnings: cmds-inspect.c: In function ‘__ino_to_path_fd’: cmds-inspect.c:47:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cmds-inspect.c: In function ‘cmd_logical_resolve’: cmds-inspect.c:171:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Zach Brown <zab@redhat.com>
This commit is contained in:
parent
6e0e6c5e63
commit
88016b0ee9
@ -17,6 +17,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
|
||||
@ -44,7 +45,7 @@ static int __ino_to_path_fd(u64 inum, int fd, int verbose, const char *prepend)
|
||||
|
||||
ipa.inum = inum;
|
||||
ipa.size = 4096;
|
||||
ipa.fspath = (u64)fspath;
|
||||
ipa.fspath = (uintptr_t)fspath;
|
||||
|
||||
ret = ioctl(fd, BTRFS_IOC_INO_PATHS, &ipa);
|
||||
if (ret) {
|
||||
@ -168,7 +169,7 @@ static int cmd_logical_resolve(int argc, char **argv)
|
||||
|
||||
loi.logical = atoll(argv[optind]);
|
||||
loi.size = size;
|
||||
loi.inodes = (u64)inodes;
|
||||
loi.inodes = (uintptr_t)inodes;
|
||||
|
||||
fd = open_file_or_dir(argv[optind+1]);
|
||||
if (fd < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user