]> granicus.if.org Git - strace/commitdiff
tests: fix "constant is too large" compilation warnings
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 13 Nov 2016 16:14:46 +0000 (19:14 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 13 Nov 2016 21:36:58 +0000 (21:36 +0000)
alarm.c: In function 'main':
alarm.c:41: warning: integer constant is too large for 'long' type
aio.c: In function 'main':
aio.c:162: warning: integer constant is too large for 'long' type
btrfs.c: In function 'btrfs_test_sync_ioctls':
btrfs.c:202: warning: integer constant is too large for 'long' type
btrfs.c: In function 'btrfs_test_subvol_ioctls':
btrfs.c:289: warning: integer constant is too large for 'long' type
btrfs.c:290: warning: integer constant is too large for 'long' type
dup2.c: In function 'main':
dup2.c:12: warning: integer constant is too large for 'long' type
dup2.c:13: warning: integer constant is too large for 'long' type
dup3.c: In function 'main':
dup3.c:13: warning: integer constant is too large for 'long' type
dup3.c:14: warning: integer constant is too large for 'long' type
epoll_create.c: In function 'main':
epoll_create.c:12: warning: integer constant is too large for 'long' type
epoll_ctl.c: In function 'invoke_syscall':
epoll_ctl.c:14: warning: integer constant is too large for 'long' type
faccessat.c: In function 'main':
faccessat.c:13: warning: integer constant is too large for 'long' type
fchdir.c: In function 'main':
fchdir.c:12: warning: integer constant is too large for 'long' type
struct_flock.c: In function 'invoke_test_syscall':
struct_flock.c:48: warning: integer constant is too large for 'long' type
struct_flock.c: In function 'test_flock_einval':
struct_flock.c:58: warning: integer constant is too large for 'long' type
struct_flock.c:59: warning: integer constant is too large for 'long' type
fcntl64.c: In function 'test_flock64_einval':
fcntl64.c:44: warning: integer constant is too large for 'long' type
fcntl64.c:45: warning: integer constant is too large for 'long' type
fcntl.c: In function 'test_flock64_einval':
fcntl.c:44: warning: integer constant is too large for 'long' type
fcntl.c:45: warning: integer constant is too large for 'long' type
fdatasync.c: In function 'main':
fdatasync.c:12: warning: integer constant is too large for 'long' type
flock.c: In function 'main':
flock.c:13: warning: integer constant is too large for 'long' type
xstatx.c: In function 'main':
xstatx.c:255: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:290: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatx.c:294: warning: integer constant is too large for 'long' type
xstatfsx.c: In function 'main':
xstatfsx.c:113: warning: integer constant is too large for 'long' type
fsync.c: In function 'main':
fsync.c:12: warning: integer constant is too large for 'long' type
ftruncate64.c: In function 'main':
ftruncate64.c:39: warning: integer constant is too large for 'long' type
futimesat.c: In function 'main':
futimesat.c:52: warning: integer constant is too large for 'long' type
futimesat.c:59: warning: integer constant is too large for 'long' type
get_mempolicy.c: In function 'main':
get_mempolicy.c:83: warning: integer constant is too large for 'long' type
get_mempolicy.c:84: warning: integer constant is too large for 'long' type
get_mempolicy.c:85: warning: integer constant is too large for 'long' type
get_mempolicy.c:86: warning: integer constant is too large for 'long' type
getdents.c: In function 'main':
getdents.c:109: warning: integer constant is too large for 'long' type
getdents.c:110: warning: integer constant is too large for 'long' type
getdents.c:114: warning: integer constant is too large for 'long' type
getdents64.c: In function 'main':
getdents64.c:114: warning: integer constant is too large for 'long' type
getdents64.c:115: warning: integer constant is too large for 'long' type
getdents64.c:119: warning: integer constant is too large for 'long' type
xgetrlimit.c: In function 'main':
xgetrlimit.c:71: warning: integer constant is too large for 'long' type
ioctl_block.c:44: warning: integer constant is too large for 'long' type
ioctl_block.c: In function 'main':
ioctl_block.c:136: warning: integer constant is too large for 'long' type
ioctl_block.c:137: warning: integer constant is too large for 'long' type
ioctl_block.c:161: warning: integer constant is too large for 'long' type
ioctl_block.c:170: warning: integer constant is too large for 'long' type
ioctl_block.c:171: warning: integer constant is too large for 'long' type
ioctl_evdev.c:42: warning: integer constant is too large for 'long' type
ioctl_mtd.c:46: warning: integer constant is too large for 'long' type
ioctl_rtc.c:40: warning: integer constant is too large for 'long' type
ioperm.c: In function 'main':
ioperm.c:12: warning: integer constant is too large for 'long' type
ioctl_v4l2.c: In function 'main':
ioctl_v4l2.c:409: warning: integer constant is too large for 'long' type
ipc.c: In function 'ipc_call':
ipc.c:52: warning: integer constant is too large for 'long' type
kill.c: In function 'main':
kill.c:59: warning: integer constant is too large for 'long' type
kill.c:62: warning: integer constant is too large for 'long' type
kill.c:63: warning: integer constant is too large for 'long' type
kill.c:68: warning: integer constant is too large for 'long' type
linkat.c: In function 'main':
linkat.c:14: warning: integer constant is too large for 'long' type
linkat.c:15: warning: integer constant is too large for 'long' type
mbind.c: In function 'main':
mbind.c:41: warning: integer constant is too large for 'long' type
mbind.c:43: warning: integer constant is too large for 'long' type
mbind.c:44: warning: integer constant is too large for 'long' type
migrate_pages.c: In function 'main':
migrate_pages.c:41: warning: integer constant is too large for 'long' type
In file included from mkdirat.c:10:
umode_t.c: In function 'test_syscall':
umode_t.c:47: warning: integer constant is too large for 'long' type
mknod.c: In function 'call_mknod':
mknod.c:16: warning: integer constant is too large for 'long' type
mknod.c: In function 'main':
mknod.c:23: warning: integer constant is too large for 'long' type
mknod.c:49: warning: integer constant is too large for 'long' type
mknod.c:56: warning: integer constant is too large for 'long' type
mknodat.c:12: warning: integer constant is too large for 'long' type
mknodat.c: In function 'call_mknodat':
mknodat.c:17: warning: integer constant is too large for 'long' type
mknodat.c: In function 'main':
mknodat.c:24: warning: integer constant is too large for 'long' type
mknodat.c:50: warning: integer constant is too large for 'long' type
mknodat.c:57: warning: integer constant is too large for 'long' type
mmap.c: In function 'main':
mmap.c:51: warning: integer constant is too large for 'long' type
move_pages.c: In function 'print_stat_pages':
move_pages.c:139: warning: integer constant is too large for 'long' type
move_pages.c: In function 'print_move_pages':
move_pages.c:166: warning: integer constant is too large for 'long' type
move_pages.c: In function 'main':
move_pages.c:188: warning: integer constant is too large for 'long' type
mq_sendrecv.c: In function 'main':
mq_sendrecv.c:238: warning: integer constant is too large for 'long' type
mq_sendrecv.c:401: warning: integer constant is too large for 'long' type
mq_sendrecv.c:403: warning: integer constant is too large for 'long' type
nsyscalls.c: In function 'test_syscall':
nsyscalls.c:64: warning: integer constant is too large for 'long' type
nsyscalls.c:65: warning: integer constant is too large for 'long' type
nsyscalls.c:66: warning: integer constant is too large for 'long' type
nsyscalls.c:67: warning: integer constant is too large for 'long' type
nsyscalls.c:68: warning: integer constant is too large for 'long' type
nsyscalls.c:69: warning: integer constant is too large for 'long' type
preadv-pwritev.c: In function 'main':
preadv-pwritev.c:162: warning: comparison between signed and unsigned
prlimit64.c: In function 'main':
prlimit64.c:65: warning: integer constant is too large for 'long' type
prlimit64.c:70: warning: integer constant is too large for 'long' type
remap_file_pages.c: In function 'main':
remap_file_pages.c:42: warning: integer constant is too large for 'long' type
remap_file_pages.c:43: warning: integer constant is too large for 'long' type
remap_file_pages.c:45: warning: integer constant is too large for 'long' type
renameat.c: In function 'main':
renameat.c:15: warning: integer constant is too large for 'long' type
renameat.c:16: warning: integer constant is too large for 'long' type
rt_sigqueueinfo.c: In function 'main':
rt_sigqueueinfo.c:41: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c: In function 'k_tgsigqueueinfo':
rt_tgsigqueueinfo.c:45: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c:46: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c:47: warning: integer constant is too large for 'long' type
rt_tgsigqueueinfo.c: In function 'main':
rt_tgsigqueueinfo.c:67: warning: integer constant is too large for 'long' type
sendfile.c: In function 'main':
sendfile.c:110: warning: integer constant is too large for 'long' type
sendfile64.c: In function 'main':
sendfile64.c:100: warning: integer constant is too large for 'long' type
set_mempolicy.c: In function 'main':
set_mempolicy.c:129: warning: integer constant is too large for 'long' type
set_mempolicy.c:130: warning: integer constant is too large for 'long' type
setrlimit.c: In function 'main':
setrlimit.c:44: warning: integer constant is too large for 'long' type
socketcall.c: In function 'test_socketcall':
socketcall.c:58: warning: integer constant is too large for 'long' type
splice.c: In function 'main':
splice.c:41: warning: integer constant is too large for 'long' type
splice.c:42: warning: integer constant is too large for 'long' type
splice.c:45: warning: integer constant is too large for 'long' type
splice.c:46: warning: integer constant is too large for 'long' type
symlinkat.c: In function 'main':
symlinkat.c:12: warning: integer constant is too large for 'long' type
sync_file_range.c: In function 'main':
sync_file_range.c:42: warning: integer constant is too large for 'long' type
sync_file_range.c:43: warning: integer constant is too large for 'long' type
syslog.c: In function 'main':
syslog.c:14: warning: integer constant is too large for 'long' type
tee.c: In function 'main':
tee.c:41: warning: integer constant is too large for 'long' type
tee.c:42: warning: integer constant is too large for 'long' type
timer_create.c: In function 'main':
timer_create.c:52: warning: integer constant is too large for 'long' type
timer_create.c:84: warning: integer constant is too large for 'long' type
timer_create.c:85: warning: integer constant is too large for 'long' type
truncate64.c: In function 'main':
truncate64.c:41: warning: integer constant is too large for 'long' type
xgetrlimit.c: In function 'main':
xgetrlimit.c:71: warning: integer constant is too large for 'long' type
umode_t.c: In function 'test_syscall':
umode_t.c:46: warning: integer constant is too large for 'long' type
unlinkat.c: In function 'main':
unlinkat.c:13: warning: integer constant is too large for 'long' type
waitpid.c: In function 'main':
waitpid.c:43: warning: integer constant is too large for 'long' type
waitid.c: In function 'poison':
waitid.c:141: warning: integer constant is too large for 'long' type
xetpriority.c: In function 'main':
xetpriority.c:15: warning: integer constant is too large for 'long' type
xetpriority.c:19: warning: integer constant is too large for 'long' type
xetpriority.c:20: warning: integer constant is too large for 'long' type
xetpgid.c: In function 'main':
xetpgid.c:43: warning: integer constant is too large for 'long' type
xetpgid.c:47: warning: integer constant is too large for 'long' type
xetpgid.c:48: warning: integer constant is too large for 'long' type

(SLES 11SP4, i386)

* tests/alarm.c (main): Add proper suffix to integer constant.
* tests/aio.c (main): Likewise.
* tests/btrfs.c (btrfs_test_sync_ioctls, btrfs_test_subvol_ioctls): Likewise.
* tests/dup2.c (main): Likewise.
* tests/dup3.c (main): Likewise.
* tests/epoll_create.c (main): Likewise.
* tests/epoll_ctl.c (invoke_syscall): Likewise.
* tests/faccessat.c (main): Likewise.
* tests/fchdir.c (main): Likewise.
* tests/fcntl.c (test_flock64_einval): Likewise.
* tests/fcntl64.c (test_flock64_einval): Likewise.
* tests/fdatasync.c (main): Likewise.
* tests/flock.c (main): Likewise.
* tests/fstat64.c (SAMPLE_SIZE): Likewise.
* tests/fstat.c (SAMPLE_SIZE): Likewise.
* tests/fsync.c (main): Likewise.
* tests/ftruncate64.c (main): Likewise.
* tests/futimesat.c (main): Likewise.
* tests/get_mempolicy.c (main): Likewise.
* tests/getdents.c (main): Likewise.
* tests/getdents64.c (main): Likewise.
* tests/ioctl_block.c (lmagic, main): Likewise.
* tests/ioctl_evdev.c (lmagic): Likewise.
* tests/ioctl_mtd.c (lmagic): Likewise.
* tests/ioctl_rtc.c (lmagic): Likewise.
* tests/ioctl_v4l2.c (main): Likewise.
* tests/ioperm.c (main): Likewise.
* tests/ipc.c (ipc_call): Likewise.
* tests/kill.c (main): Likewise.
* tests/linkat.c (main): Likewise.
* tests/lstat64.c (SAMPLE_SIZE): Likewise.
* tests/lstat.c (SAMPLE_SIZE): Likewise.
* tests/mbind.c (main): Likewise.
* tests/migrate_pages.c (main): Likewise.
* tests/mkdirat.c (TEST_SYSCALL_PREFIX_ARGS): Likewise.
* tests/mknod.c (call_mknod, main): Likewise.
* tests/mknodat.c (fd, call_mknodat, main): Likewise.
* tests/mmap.c (main): Likewise.
* tests/move_pages.c (print_stat_pages, print_move_pages): Likewise.
* tests/mq_sendrecv.c (main): Likewise.
* tests/nsyscalls.c (test_syscall): Likewise.
* tests/prlimit64.c (main): Likewise.
* tests/remap_file_pages.c (main): Likewise.
* tests/renameat.c (main): Likewise.
* tests/rt_sigqueueinfo.c (main): Likewise.
* tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo, main): Likewise.
* tests/sendfile.c (main): Likewise.
* tests/sendfile64.c (main): Likewise.
* tests/set_mempolicy.c (main): Likewise.
* tests/setrlimit.c (main): Likewise.
* tests/socketcall.c (test_socketcall): Likewise.
* tests/splice.c (main): Likewise.
* tests/stat64.c (SAMPLE_SIZE): Likewise.
* tests/stat.c (SAMPLE_SIZE): Likewise.
* tests/struct_flock.c (invoke_test_syscall, test_flock_einval): Likewise.
* tests/symlinkat.c (main): Likewise.
* tests/sync_file_range.c (main): Likewise.
* tests/syslog.c (main): Likewise.
* tests/tee.c (main): Likewise.
* tests/timer_create.c (main): Likewise.
* tests/truncate64.c (main): Likewise.
* tests/umode_t.c (test_syscall): Likewise.
* tests/unlinkat.c (main): Likewise.
* tests/waitid.c (main): Likewise.
* tests/waitpid.c (main): Likewise.
* tests/xetpgid.c (main): Likewise.
* tests/xetpriority.c (main): Likewise.
* tests/xgetrlimit.c (main): Likewise.
* tests/xstatfsx.c (main) [CHECK_ODD_SIZE]: Likewise.
* tests/xstatx.c (main): Likewise.

70 files changed:
tests/aio.c
tests/alarm.c
tests/btrfs.c
tests/dup2.c
tests/dup3.c
tests/epoll_create.c
tests/epoll_ctl.c
tests/faccessat.c
tests/fchdir.c
tests/fcntl.c
tests/fcntl64.c
tests/fdatasync.c
tests/flock.c
tests/fstat.c
tests/fstat64.c
tests/fsync.c
tests/ftruncate64.c
tests/futimesat.c
tests/get_mempolicy.c
tests/getdents.c
tests/getdents64.c
tests/ioctl_block.c
tests/ioctl_evdev.c
tests/ioctl_mtd.c
tests/ioctl_rtc.c
tests/ioctl_v4l2.c
tests/ioperm.c
tests/ipc.c
tests/kill.c
tests/linkat.c
tests/lstat.c
tests/lstat64.c
tests/mbind.c
tests/migrate_pages.c
tests/mkdirat.c
tests/mknod.c
tests/mknodat.c
tests/mmap.c
tests/move_pages.c
tests/mq_sendrecv.c
tests/nsyscalls.c
tests/prlimit64.c
tests/remap_file_pages.c
tests/renameat.c
tests/rt_sigqueueinfo.c
tests/rt_tgsigqueueinfo.c
tests/sendfile.c
tests/sendfile64.c
tests/set_mempolicy.c
tests/setrlimit.c
tests/socketcall.c
tests/splice.c
tests/stat.c
tests/stat64.c
tests/struct_flock.c
tests/symlinkat.c
tests/sync_file_range.c
tests/syslog.c
tests/tee.c
tests/timer_create.c
tests/truncate64.c
tests/umode_t.c
tests/unlinkat.c
tests/waitid.c
tests/waitpid.c
tests/xetpgid.c
tests/xetpriority.c
tests/xgetrlimit.c
tests/xstatfsx.c
tests/xstatx.c

index 8717f4fafcce71bb3ee036fccfba56506ea022c5..7c5afac240b47c640339674b9f708fe9cf19e4d5 100644 (file)
@@ -159,7 +159,7 @@ main(void)
                        .aio_fildes = 0xdefaced1,
                        .aio_buf = (unsigned long)data2,
                        .aio_nbytes = sizeof(data2),
-                       .aio_offset = 0xdeadda7abadc0ded,
+                       .aio_offset = 0xdeadda7abadc0dedULL,
                },
                {
                        .aio_data = 0,
index f954dcf3b843f2c4295fa48d6547cf2281d89a23..291b26ad9b70af864f92ea1607a9bdb9c7e506c8 100644 (file)
@@ -38,7 +38,7 @@
 int
 main(void)
 {
-       int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002a);
+       int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002aULL);
        printf("alarm(%u) = %d\n", 42, rc);
 
        puts("+++ exited with 0 +++");
index d6005347fd6a779030f9c2e15d115924f304effc..85541a1d2ee6f865ec1db24d17adf7197d6c6670 100644 (file)
@@ -199,7 +199,7 @@ btrfs_test_trans_ioctls(void)
 static void
 btrfs_test_sync_ioctls(void)
 {
-       uint64_t u64val = 0xdeadbeefbadc0ded;
+       uint64_t u64val = 0xdeadbeefbadc0dedULL;
 
        ioctl(-1, BTRFS_IOC_SYNC, NULL);
        printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n");
@@ -286,8 +286,8 @@ btrfs_test_subvol_ioctls(void)
 {
        const char *subvol_name = "subvol-name";
        char *long_subvol_name;
-       void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeed;
-       uint64_t u64val = 0xdeadbeefbadc0ded;
+       void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL;
+       uint64_t u64val = 0xdeadbeefbadc0dedULL;
        struct btrfs_ioctl_vol_args vol_args = {};
        struct btrfs_ioctl_vol_args_v2 vol_args_v2 = {
                .fd = 2,
index 04a261c4245f91cfa51effa40eb42fce02ac7227..9f3addfa904cb1b5a28102df0cc5ccace486ae1f 100644 (file)
@@ -9,8 +9,8 @@
 int
 main(void)
 {
-       const long int fd_old = (long int) 0xdeadbeefffffffff;
-       const long int fd_new = (long int) 0xdeadbeeffffffffe;
+       const long int fd_old = (long int) 0xdeadbeefffffffffULL;
+       const long int fd_new = (long int) 0xdeadbeeffffffffeULL;
 
        long rc = syscall(__NR_dup2, fd_old, fd_new);
        printf("dup2(%d, %d) = %ld %s (%m)\n",
index 2611dd8c33c825f85e8e293a38f6c209b0cdee4a..252e846937955fee5883b408bcd1d17645e1c5ba 100644 (file)
@@ -10,8 +10,8 @@
 int
 main(void)
 {
-       const long int fd_old = (long int) 0xdeadbeefffffffff;
-       const long int fd_new = (long int) 0xdeadbeeffffffffe;
+       const long int fd_old = (long int) 0xdeadbeefffffffffULL;
+       const long int fd_new = (long int) 0xdeadbeeffffffffeULL;
 
        long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC);
        printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n",
index 1f2485239fb7f28d322f526dc4d5360090963187..44262c7db11206b82abf65599d0237877b679dd7 100644 (file)
@@ -9,7 +9,7 @@
 int
 main(void)
 {
-       const long int size = (long int) 0xdeadbeefffffffff;
+       const long int size = (long int) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_epoll_create, size);
        printf("epoll_create(%d) = %ld %s (%m)\n",
index 8b46f4e3aff179d9f72d80d9185d739eec08f504..e666055567d3ecc9d6ae4a6373c7e4336be16d40 100644 (file)
@@ -11,7 +11,7 @@
 static long
 invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev)
 {
-       op |= (unsigned long) 0xffffffff00000000;
+       op |= (unsigned long) 0xffffffff00000000ULL;
        return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev);
 }
 
index c21039d6bfdc76a905cc65c3f289dc29ad1c1bae..ce81349d142a7abbe007a186c0eae27c693ce11c 100644 (file)
@@ -10,7 +10,7 @@ int
 main(void)
 {
        static const char sample[] = "faccessat.sample";
-       const long int fd = (long int) 0xdeadbeefffffffff;
+       const long int fd = (long int) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_faccessat, fd, sample, F_OK);
        printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n",
index 580887212e4589bc3901e049b59ce3cb810e99ce..3cde5e6354cb51d0f7acba3084fda5d12fff302c 100644 (file)
@@ -9,7 +9,7 @@
 int
 main(void)
 {
-       const long int fd = (long int) 0xdeadbeefffffffff;
+       const long int fd = (long int) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_fchdir, fd);
        printf("fchdir(%d) = %ld %s (%m)\n",
index 4ae5beb7e60062f3fa395bb0172c1cf5b7af6447..f060cdf8f4725e8f18c647e0500cc9542f719928 100644 (file)
@@ -41,8 +41,8 @@ test_flock64_einval(const int cmd, const char *name)
 {
        struct_kernel_flock64 fl = {
                .l_type = F_RDLCK,
-               .l_start = 0xdefaced1facefeed,
-               .l_len = 0xdefaced2cafef00d
+               .l_start = 0xdefaced1facefeedULL,
+               .l_len = 0xdefaced2cafef00dULL
        };
        invoke_test_syscall(cmd, &fl);
        printf("%s(0, %s, %p) = %s\n",
index ff6a5315b81527cea2c700b91626440e13275485..5ecd6eb98f874f8bf888dbb1bba12f0e58e28bb1 100644 (file)
@@ -41,8 +41,8 @@ test_flock64_einval(const int cmd, const char *name)
 {
        struct_kernel_flock64 fl = {
                .l_type = F_RDLCK,
-               .l_start = 0xdefaced1facefeed,
-               .l_len = 0xdefaced2cafef00d
+               .l_start = 0xdefaced1facefeedULL,
+               .l_len = 0xdefaced2cafef00dULL
        };
        invoke_test_syscall(cmd, &fl);
        printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET"
index c47a0bfbe2423f15f4d1ef20713e07a876a688be..fc82ade33e8b359f556b814a0913ab7ffb4aa2fc 100644 (file)
@@ -9,7 +9,7 @@
 int
 main(void)
 {
-       const long int fd = (long int) 0xdeadbeefffffffff;
+       const long int fd = (long int) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_fdatasync, fd);
        printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());
index cb231d53edf36c0fe6640652350675cca4899c94..c154e43796d154359497da49ada924cc6ffab9ba 100644 (file)
@@ -10,7 +10,7 @@
 int
 main(void)
 {
-       const unsigned long fd = (long int) 0xdeadbeefffffffff;
+       const unsigned long fd = (long int) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_flock, fd, LOCK_SH);
        printf("flock(%d, LOCK_SH) = %ld %s (%m)\n",
index 9ddc81185146b09fabf50916811b8ba9c04d34ff..8a6c85313e9b4ffcac71979ce666cf925a9e1630 100644 (file)
@@ -32,7 +32,7 @@
 
 # define TEST_SYSCALL_NR __NR_fstat
 # define TEST_SYSCALL_STR "fstat"
-# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418)
+# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
 # include "fstatx.c"
 
 #else
index cf147df3c0ef79c76456c064f5c2d5a4f5274347..8997c4f2b3ea68fd291630249c15b08843a5539b 100644 (file)
@@ -35,7 +35,7 @@
 # define STRUCT_STAT struct stat64
 # define STRUCT_STAT_STR "struct stat64"
 # define STRUCT_STAT_IS_STAT64 1
-# define SAMPLE_SIZE ((libc_off_t) 43147718418)
+# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
 # include "fstatx.c"
 
 #else
index 42aa5c734784d2fcb2470bf7085069b864a5b8c7..2f504106889d38f8cd47e97121f115a437deb8e1 100644 (file)
@@ -9,7 +9,7 @@
 int
 main(void)
 {
-       const long int fd = (long int) 0xdeadbeefffffffff;
+       const long int fd = (long int) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_fsync, fd);
        printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());
index 7530e7070a24abe5425e93a6ef71d3490a4fef68..90d9938fc3885497821ce1bb281a203c08765367 100644 (file)
@@ -36,7 +36,7 @@
 int
 main(void)
 {
-       const off_t len = 0xdefaceddeadbeef;
+       const off_t len = 0xdefaceddeadbeefULL;
 
        int rc = ftruncate(-1, len);
        printf("ftruncate64(-1, %llu) = %d %s (%m)\n",
index 4e76cc8a31aea252f692051abb0a437f65d99dc7..b56911c4976b6c103e54ed2badbd3e087f40ffdf 100644 (file)
@@ -49,14 +49,14 @@ main(void)
                perror_msg_and_fail("gettimeofday");
 
        static const char sample[] = "futimesat_sample";
-       unsigned long dirfd = (unsigned long) 0xdeadbeef00000000 | -100U;
+       unsigned long dirfd = (unsigned long) 0xdeadbeef00000000ULL | -100U;
 
        long rc = syscall(__NR_futimesat, dirfd, sample, 0);
        printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
        struct timeval *const ts = tail_alloc(sizeof(*ts) * 2);
-       dirfd = (unsigned long) 0xdeadbeefffffffff;
+       dirfd = (unsigned long) 0xdeadbeefffffffffULL;
 
        rc = syscall(__NR_futimesat, dirfd, 0, ts + 1);
        printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n",
index 6be3ef29d3d344f3c04bd88ac80858068dce8493..03d1bffc5dca744f7e660db06bd85485cbc7e6bc 100644 (file)
@@ -81,9 +81,9 @@ main(void)
        puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0");
 
        int *mode = (void *) 0xdefaced1baddeed2;
-       unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded;
-       const unsigned long *nodemask = (void *) 0xfacedad3bebefed4;
-       const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef;
+       unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL;
+       const unsigned long *nodemask = (void *) 0xfacedad3bebefed4ULL;
+       const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL;
        const unsigned long flags = -1U;
        rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags);
        printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n",
index 5e642340f8186ae6bb7a3e3cd7294f689d3effa7..4c8455f89b1dd937d4185b5f841f7f8229ff245b 100644 (file)
@@ -106,12 +106,13 @@ main(int ac, const char **av)
        assert(!close(0));
        assert(!open(".", O_RDONLY | O_DIRECTORY));
 
-       unsigned long count = (unsigned long) 0xfacefeeddeadbeef;
-       long rc = syscall(__NR_getdents, (long) 0xdefacedffffffff, NULL, count);
+       unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL;
+       long rc = syscall(__NR_getdents, (long) 0xdefacedffffffffULL, NULL,
+                         count);
        printf("getdents(-1, NULL, %u) = %ld %s (%m)\n",
               (unsigned) count, rc, errno2name());
 
-       count = (unsigned long) 0xfacefeed00000000 | sizeof(buf);
+       count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf);
        while ((rc = syscall(__NR_getdents, 0, buf, count))) {
                kernel_dirent *d;
                long i;
index 2243b8420ec143659b9e4d6e70000286a8124142..9da2a23c22a12bbcc044a1b5375c3c13017f0e89 100644 (file)
@@ -111,12 +111,13 @@ main(int ac, const char **av)
        assert(!close(0));
        assert(!open(".", O_RDONLY | O_DIRECTORY));
 
-       unsigned long count = (unsigned long) 0xfacefeeddeadbeef;
-       long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffff, NULL, count);
+       unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL;
+       long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffffULL, NULL,
+                         count);
        printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n",
               (unsigned) count, rc, errno2name());
 
-       count = (unsigned long) 0xfacefeed00000000 | sizeof(buf);
+       count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf);
        while ((rc = syscall(__NR_getdents64, 0, buf, count))) {
                kernel_dirent64 *d;
                long i;
index 07e7d34d235ab6130dd2eb27e828ff9a26664d3a..221a3f14499cd04899d459c5fc61a40d37796937 100644 (file)
@@ -41,7 +41,7 @@
 #include "xlat.h"
 
 static const unsigned int magic = 0xdeadbeef;
-static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
+static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
 
 static void
 init_magic(void *addr, const unsigned int size)
@@ -133,8 +133,8 @@ main(void)
        printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int);
 
        uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2);
-       pair_int64[0] = 0xdeadbeefbadc0ded;
-       pair_int64[1] = 0xfacefeedcafef00d;
+       pair_int64[0] = 0xdeadbeefbadc0dedULL;
+       pair_int64[1] = 0xfacefeedcafef00dULL;
 
 #ifdef BLKDISCARD
        ioctl(-1, BLKDISCARD, pair_int64);
@@ -158,7 +158,7 @@ main(void)
        blkpg->op = 3;
        blkpg->flags = 0xdeadbeef;
        blkpg->datalen = 0xbadc0ded;
-       blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeed;
+       blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeedULL;
 
        ioctl(-1, BLKPG, blkpg);
        printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d"
@@ -167,8 +167,8 @@ main(void)
               (unsigned long) blkpg->data);
 
        struct blkpg_partition *const bp = tail_alloc(sizeof(*bp));
-       bp->start = 0xfac1fed2dad3bef4;
-       bp->length = 0xfac5fed6dad7bef8;
+       bp->start = 0xfac1fed2dad3bef4ULL;
+       bp->length = 0xfac5fed6dad7bef8ULL;
        bp->pno = magic;
        memset(bp->devname, 'A', sizeof(bp->devname));
        memset(bp->volname, 'B', sizeof(bp->volname));
index 892075dc32126d267053992ba22a55f5b164c3d9..aded93f08d749f9031638d256b740521a2193f05 100644 (file)
@@ -39,7 +39,7 @@
 # include <linux/input.h>
 
 static const unsigned int magic = 0xdeadbeef;
-static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
+static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
 
 static void
 init_magic(void *addr, const unsigned int size)
index b761da8555bb74de93a27571dcfa05fa1e66a017..e28bcc9d5451fe6cf456e2214a57ea1bef878e3d 100644 (file)
@@ -43,7 +43,7 @@
 #endif
 
 static const unsigned int magic = 0xdeadbeef;
-static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
+static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
 
 static void
 init_magic(void *addr, const unsigned int size)
index ac967637d11de79a42878e870577ea52cd6e36fa..34264ce58641eb75a9fa7c19f4b45f3beea7fb09 100644 (file)
@@ -37,7 +37,7 @@
 #include "xlat.h"
 
 static const unsigned int magic = 0xdeadbeef;
-static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded;
+static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL;
 
 static void
 init_magic(void *addr, const unsigned int size)
index 850783d597759c96fb221c4cefae7417265e1cf3..dbf082868412b3634c655e021464d9393bbd3e31 100644 (file)
@@ -406,7 +406,7 @@ main(void )
                tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count);
        p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS;
        p_ext_controls->controls[0].size = 0;
-       p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeef;
+       p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeefULL;
        p_ext_controls->controls[1].id = V4L2_CID_CONTRAST;
        p_ext_controls->controls[1].size = 2;
        p_ext_controls->controls[1].string =
index 12342f30704e1ab72d697dfc768ec0facdd51ce2..2f02b5234002e87a190ddf0147311f1cf5f3066b 100644 (file)
@@ -9,7 +9,7 @@
 int
 main(void)
 {
-       const unsigned long port = (unsigned long) 0xdeafbeefffffffff;
+       const unsigned long port = (unsigned long) 0xdeafbeefffffffffULL;
 
        long rc = syscall(__NR_ioperm, port, 1, 0);
        printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n",
index f5b9ef5f712db5d2bbbe0cb67eb6094f01ba9b01..c64d3716a819ac4a2c59e60c54f7304965803a3a 100644 (file)
@@ -49,7 +49,7 @@ ipc_call(const unsigned short version, const unsigned short call,
         long a1, long a2, long a3, long a4, long a5)
 {
        const unsigned long val =
-               (unsigned long) 0xfacefeed00000000 |
+               (unsigned long) 0xfacefeed00000000ULL |
                (unsigned int) version << 16 |
                call;
 
index 0e07e1f52f6688a4a5c3fde6dde66db2081cbeb2..cb884aa1ad401870ef2e38446f8fbb83d3583372 100644 (file)
@@ -56,16 +56,16 @@ main(void)
                perror_msg_and_fail("sigprocmask");
 
        const int pid = getpid();
-       long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000 | SIGALRM);
+       long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000ULL | SIGALRM);
        printf("kill(%d, SIGALRM) = %ld\n", pid, rc);
 
-       const long big_pid = (long) 0xfacefeedbadc0ded;
-       const long big_sig = (long) 0xdeadbeefcafef00d;
+       const long big_pid = (long) 0xfacefeedbadc0dedULL;
+       const long big_sig = (long) 0xdeadbeefcafef00dULL;
        rc = syscall(__NR_kill, big_pid, big_sig);
        printf("kill(%d, %d) = %ld %s (%m)\n",
               (int) big_pid, (int) big_sig, rc, errno2name());
 
-       rc = syscall(__NR_kill, (long) 0xdefaced00000000 | pid, 0);
+       rc = syscall(__NR_kill, (long) 0xdefaced00000000ULL | pid, 0);
        printf("kill(%d, SIG_0) = %ld\n", pid, rc);
 
        puts("+++ exited with 0 +++");
index 2c3b8baa19f6f9847dc16638d5b527c5c2e03a8d..64b900ea0a81b5ce8d31b58fe9abec01564f801f 100644 (file)
@@ -11,8 +11,8 @@ main(void)
 {
        static const char sample_1[] = "linkat_sample_old";
        static const char sample_2[] = "linkat_sample_new";
-       const long fd_old = (long) 0xdeadbeefffffffff;
-       const long fd_new = (long) 0xdeadbeeffffffffe;
+       const long fd_old = (long) 0xdeadbeefffffffffULL;
+       const long fd_new = (long) 0xdeadbeeffffffffeULL;
 
        long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0);
        printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n",
index 76cb8a2f8c8de27e08b85ae7649021ae5461ce96..34a0e1d87cc7fcc10f1343f250b508d1e6612530 100644 (file)
@@ -32,7 +32,7 @@
 
 # define TEST_SYSCALL_NR __NR_lstat
 # define TEST_SYSCALL_STR "lstat"
-# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418)
+# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
 # include "lstatx.c"
 
 #else
index 68ef638beccdc7b706a9cfafdfcca4d5e0071b9f..ffb2c02999e8d323db48173cfbb5b9ff72755dcd 100644 (file)
@@ -35,7 +35,7 @@
 # define STRUCT_STAT struct stat64
 # define STRUCT_STAT_STR "struct stat64"
 # define STRUCT_STAT_IS_STAT64 1
-# define SAMPLE_SIZE ((libc_off_t) 43147718418)
+# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
 # include "lstatx.c"
 
 #else
index 94d455392e298134511ebe01b9add94ca39bf38e..b0544263d3f2b9bda210c244b17f45167bad2204 100644 (file)
 int
 main(void)
 {
-       const unsigned long len = (unsigned long) 0xcafef00dbadc0ded;
+       const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL;
        const unsigned long mode = 3;
-       const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1;
-       const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2;
+       const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1ULL;
+       const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2ULL;
        const unsigned long flags = -1UL;
 
        long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags);
index 9f71b52c6e1ba68aa104279628a9be9e38fd3f7b..4c303e380790a1022d36fb81099845138cf240b4 100644 (file)
@@ -38,7 +38,7 @@
 int
 main(void)
 {
-       const long pid = (long) 0xfacefeedffffffff;
+       const long pid = (long) 0xfacefeedffffffffULL;
        long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0);
        printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n",
               (int) pid, rc, errno2name());
index ce2e9c180b4821519cf4fbe0de2e24a3b4f915fa..6bfe4a5fc56f1ea8ff303c50fe462d208d9f9bc6 100644 (file)
@@ -5,7 +5,7 @@
 
 # define TEST_SYSCALL_NR               __NR_mkdirat
 # define TEST_SYSCALL_STR              "mkdirat"
-# define TEST_SYSCALL_PREFIX_ARGS      (long int) 0xdeadbeefffffffff,
+# define TEST_SYSCALL_PREFIX_ARGS      (long int) 0xdeadbeefffffffffULL,
 # define TEST_SYSCALL_PREFIX_STR       "-1, "
 # include "umode_t.c"
 
index 2d428743862b37d6ede013d675cc3abc5c0bfa10..4cc1c5cb7fbc68a567dc2b853fec36180b9b3067 100644 (file)
@@ -13,14 +13,14 @@ static const char sample[] = "mknod";
 static long
 call_mknod(unsigned short mode, unsigned long dev)
 {
-       unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode;
+       unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode;
        return syscall(__NR_mknod, sample, lmode, dev);
 }
 
 int
 main(void)
 {
-       unsigned long dev = (unsigned long) 0xdeadbeefbadc0ded;
+       unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL;
 
        long rc = call_mknod(0, dev);
        printf("mknod(\"%s\", 000) = %ld %s (%m)\n",
@@ -46,14 +46,14 @@ main(void)
        printf("mknod(\"%s\", S_IFIFO|0600) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
-       dev = (unsigned long) 0xdeadbeef00000000 | makedev(1, 7);
+       dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7);
 
        rc = call_mknod(S_IFCHR | 024, dev);
        printf("mknod(\"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
        const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK;
-       dev = (unsigned long) 0xdeadbeefbadc0ded;
+       dev = (unsigned long) 0xdeadbeefbadc0dedULL;
 
        rc = call_mknod(mode, dev);
        printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"
index 614513e8bec02d0b6aabb3968a57c5a2b71dc5ce..756e277138ee70f3eb67fa68bb3f0b0e1a626a5d 100644 (file)
@@ -9,19 +9,19 @@
 # include <unistd.h>
 
 static const char sample[] = "mknodat_sample";
-static const long int fd = (long int) 0xdeadbeefffffffff;
+static const long int fd = (long int) 0xdeadbeefffffffffULL;
 
 static long
 call_mknodat(unsigned short mode, unsigned long dev)
 {
-       unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode;
+       unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode;
        return syscall(__NR_mknodat, fd, sample, lmode, dev);
 }
 
 int
 main(void)
 {
-       unsigned long dev = (unsigned long) 0xdeadbeefbadc0ded;
+       unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL;
 
        long rc = call_mknodat(0, dev);
        printf("mknodat(-1, \"%s\", 000) = %ld %s (%m)\n",
@@ -47,14 +47,14 @@ main(void)
        printf("mknodat(-1, \"%s\", S_IFIFO|0600) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
-       dev = (unsigned long) 0xdeadbeef00000000 | makedev(1, 7);
+       dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7);
 
        rc = call_mknodat(S_IFCHR | 024, dev);
        printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
        const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK;
-       dev = (unsigned long) 0xdeadbeefbadc0ded;
+       dev = (unsigned long) 0xdeadbeefbadc0dedULL;
 
        rc = call_mknodat(mode, dev);
        printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"
index e2ff71631d665c8b03a20f9e06f000c0a2f0bd1c..f726f63efa1f022201a6a90bcd9252073fec96bd 100644 (file)
@@ -45,10 +45,10 @@ main(int ac, char **av)
        void *addr, *p;
 
 #if ULONG_MAX > 4294967295UL
-       offset = 0xcafedeadbeef000 & -pagesize;
+       offset = 0xcafedeadbeef000ULL & -pagesize;
        addr = (void *) (uintmax_t) (0xfacefeed000 & -pagesize);
 #else
-       offset = 0xdeadbeef000 & -pagesize;
+       offset = 0xdeadbeef000ULL & -pagesize;
        addr = (void *) (unsigned int) (0xfaced000 & -pagesize);
 #endif
        const uintmax_t uoffset =
index 3be7446ae3814f10a66647b1d1e4fd35791d3902..f4ccafa2c45aaca9d0d20865b6a5471864e05cae 100644 (file)
@@ -136,7 +136,7 @@ static void
 print_stat_pages(const unsigned long pid, const unsigned long count,
                 const void **const pages, int *const status)
 {
-       const unsigned long flags = (unsigned long) 0xfacefeed00000002;
+       const unsigned long flags = (unsigned long) 0xfacefeed00000002ULL;
 
        long rc = syscall(__NR_move_pages,
                          pid, count, pages, NULL, status, flags);
@@ -163,7 +163,7 @@ print_move_pages(const unsigned long pid,
                 int *const nodes,
                 int *const status)
 {
-       const unsigned long flags = (unsigned long) 0xfacefeed00000004;
+       const unsigned long flags = (unsigned long) 0xfacefeed00000004ULL;
        count += offset;
 
        long rc = syscall(__NR_move_pages,
@@ -185,7 +185,7 @@ int
 main(void)
 {
        const unsigned long pid =
-               (unsigned long) 0xfacefeed00000000 | getpid();
+               (unsigned long) 0xfacefeed00000000ULL | getpid();
        unsigned long count = 1;
        const unsigned page_size = get_page_size();
        const void *const page = tail_alloc(page_size);
index de6464b3fa364561fcc1230868b448b50e0271bf..97bf9f2b88193d706caa9f023bf03b5bba76bedc 100644 (file)
@@ -235,7 +235,7 @@ main(void)
        struct_sigevent bogus_sev_data = {
                .sigev_notify = 0xdefaced,
                .sigev_signo = 0xfacefeed,
-               .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded
+               .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL
        };
 
        const char *errstr;
@@ -398,9 +398,9 @@ main(void)
        /* SIGEV_THREAD */
        bogus_sev->sigev_notify = SIGEV_THREAD;
        bogus_sev->sigev_un.sigev_thread.function =
-               (unsigned long) 0xdeadbeefbadc0ded;
+               (unsigned long) 0xdeadbeefbadc0dedULL;
        bogus_sev->sigev_un.sigev_thread.attribute =
-               (unsigned long) 0xcafef00dfacefeed;
+               (unsigned long) 0xcafef00dfacefeedULL;
        rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev);
        printf("mq_notify(%d, {sigev_value={int=%d, ptr=%#lx}, "
               "sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, "
index 8e09acb922a421a025e11f9d141a241de950cc7c..68cb1481abf22eef3d6c3d41c14b30e2eefdaef9 100644 (file)
@@ -61,12 +61,12 @@ static void
 test_syscall(const unsigned long nr)
 {
        static const kernel_ulong_t a[] = {
-               (kernel_ulong_t) 0xface0fedbadc0ded,
-               (kernel_ulong_t) 0xface1fedbadc1ded,
-               (kernel_ulong_t) 0xface2fedbadc2ded,
-               (kernel_ulong_t) 0xface3fedbadc3ded,
-               (kernel_ulong_t) 0xface4fedbadc4ded,
-               (kernel_ulong_t) 0xface5fedbadc5ded
+               (kernel_ulong_t) 0xface0fedbadc0dedULL,
+               (kernel_ulong_t) 0xface1fedbadc1dedULL,
+               (kernel_ulong_t) 0xface2fedbadc2dedULL,
+               (kernel_ulong_t) 0xface3fedbadc3dedULL,
+               (kernel_ulong_t) 0xface4fedbadc4dedULL,
+               (kernel_ulong_t) 0xface5fedbadc5dedULL
        };
 
        long rc = syscall(nr | SYSCALL_BIT,
index e62ea26118ff6c39ffed3751ef70613c2ab8ffd3..1e65116104d594779965173723dd775afbba1d54 100644 (file)
@@ -62,12 +62,12 @@ int
 main(void)
 {
        unsigned long pid =
-               (unsigned long) 0xdefaced00000000 | (unsigned) getpid();
+               (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid();
        uint64_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2);
        const struct xlat *xlat;
 
        for (xlat = resources; xlat->str; ++xlat) {
-               unsigned long res = 0xfacefeed00000000 | xlat->val;
+               unsigned long res = 0xfacefeed00000000ULL | xlat->val;
                long rc = syscall(__NR_prlimit64, pid, res, 0, rlimit);
                if (rc)
                        printf("prlimit64(%d, %s, NULL, %p) = %ld %s (%m)\n",
index 9298f2898126a2565170d89bafda06efe89d650f..452d2de75c62297929491dcb10c9150014afd1c3 100644 (file)
 int
 main(void)
 {
-       const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef;
-       const unsigned long size = (unsigned long) 0xdefaced1bad2f00d;
+       const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL;
+       const unsigned long size = (unsigned long) 0xdefaced1bad2f00dULL;
        const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC;
-       const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed;
+       const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deedULL;
        const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS;
 
        long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags);
index d2015789676e62e751d1da45463cf7aae651a7d6..2b874efac4703627f0fda619d8cbb5d22abb4979 100644 (file)
@@ -12,8 +12,8 @@
 int
 main(void)
 {
-       const long int fd_old = (long int) 0xdeadbeefffffffff;
-       const long int fd_new = (long int) 0xdeadbeeffffffffe;
+       const long int fd_old = (long int) 0xdeadbeefffffffffULL;
+       const long int fd_new = (long int) 0xdeadbeeffffffffeULL;
 
        long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE);
        printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n",
index 9ca860adf73b1f138a36655db41822b7ffa11f5a..aba6776c5869b3b3c724421380d2321e66bba22a 100644 (file)
@@ -38,7 +38,7 @@ main (void)
                .sa_handler = SIG_IGN
        };
        union sigval value = {
-               .sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0ded
+               .sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0dedULL
        };
        pid_t pid = getpid();
 
index ebfb7196643f764158cbeb541fde4961dcadb79e..d0500c321db1b08fa7e81b87efef87365e3e1983 100644 (file)
@@ -42,9 +42,9 @@ static long
 k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info)
 {
        return syscall(__NR_rt_tgsigqueueinfo,
-                      (unsigned long) 0xffffffff00000000 | pid,
-                      (unsigned long) 0xffffffff00000000 | pid,
-                      (unsigned long) 0xffffffff00000000 | sig,
+                      (unsigned long) 0xffffffff00000000ULL | pid,
+                      (unsigned long) 0xffffffff00000000ULL | pid,
+                      (unsigned long) 0xffffffff00000000ULL | sig,
                       info);
 }
 
@@ -64,7 +64,7 @@ main (void)
        info->si_code = SI_QUEUE;
        info->si_pid = getpid();
        info->si_uid = getuid();
-       info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeed;
+       info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeedULL;
 
        if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info))
                (errno == ENOSYS ? perror_msg_and_skip : perror_msg_and_fail)(
index 61f9212f209229c3759e38238b3b942eb2097b2a..23f096b623bad84c2ed3f050b60f0853754cbb0b 100644 (file)
@@ -107,7 +107,7 @@ main(int ac, const char **av)
 
        if (p_off != p) {
                uint64_t *p_off64 = (uint64_t *) p_off;
-               *p_off64 = 0xcafef00dfacefeed;
+               *p_off64 = 0xcafef00dfacefeedULL;
                assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1);
                printf("sendfile(%d, %d, [14627392582579060461], 1)"
                       " = -1 EINVAL (%m)\n", sv[1], reg_in);
index f757963e8fdb46068f5d558cd1eb580cce2d2143..7208c3006965f31400276bc4a34e813bd2b3f884 100644 (file)
@@ -97,7 +97,7 @@ main(int ac, const char **av)
               (unsigned long) stb.st_size + 1,
               (unsigned long) blen);
 
-       *p_off = 0xcafef00dfacefeed;
+       *p_off = 0xcafef00dfacefeedULL;
        assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1);
        printf("sendfile64(%d, %d, [14627392582579060461], 1)"
                " = -1 EINVAL (%m)\n", sv[1], reg_in);
index 3802eafa84ea76e56f6a2b8537098faeb50cb9c1..f3261a09477c733c8fd20cc6583c61ff4941469a 100644 (file)
@@ -126,8 +126,8 @@ main(void)
                perror_msg_and_skip("set_mempolicy");
        puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0");
 
-       const unsigned long *nodemask = (void *) 0xfacefeedfffffffe;
-       const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded;
+       const unsigned long *nodemask = (void *) 0xfacefeedfffffffeULL;
+       const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL;
        long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode);
        printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %s\n",
               nodemask, maxnode, sprintrc(rc));
index 95dd898587c89d8897513aa13f46fa6451f025d1..e93c8e3724d54960ef8a6a9df4fd3b797e80dd30 100644 (file)
@@ -41,7 +41,7 @@ main(void)
        const struct xlat *xlat;
 
        for (xlat = resources; xlat->str; ++xlat) {
-               unsigned long res = 0xfacefeed00000000 | xlat->val;
+               unsigned long res = 0xfacefeed00000000ULL | xlat->val;
                long rc = syscall(__NR_setrlimit, res, 0);
                printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc));
 
index d2ec959a7b3c5de358960cd212a135ee375195d5..4fe1ea3ac1350511b3c63066052915909bc6b4d3 100644 (file)
@@ -55,7 +55,7 @@ static void
 test_socketcall(const int i, const void *const addr)
 {
        const unsigned long call =
-               (unsigned long) 0xfacefeed00000000 | (unsigned int) i;
+               (unsigned long) 0xfacefeed00000000ULL | (unsigned int) i;
 
        long rc = syscall(__NR_socketcall, call, addr);
 
index 5a899109c8bff6c053f601d235de1e9e85221e67..b6f252560642f9e3b70c1987b855c1ef578c6b54 100644 (file)
 int
 main(void)
 {
-       const long int fd_in = (long int) 0xdeadbeefffffffff;
-       const long int fd_out = (long int) 0xdeadbeeffffffffe;
+       const long int fd_in = (long int) 0xdeadbeefffffffffULL;
+       const long int fd_out = (long int) 0xdeadbeeffffffffeULL;
        long long int *const off_in = tail_alloc(sizeof(*off_in));
        long long int *const off_out = tail_alloc(sizeof(*off_out));
-       *off_in = 0xdeadbef1facefed1;
-       *off_out = 0xdeadbef2facefed2;
+       *off_in = 0xdeadbef1facefed1ULL;
+       *off_out = 0xdeadbef2facefed2ULL;
        const size_t len = (size_t) 0xdeadbef3facefed3ULL;
        const unsigned int flags = 15;
 
index df6cab16bdb2a1431cf3949b92b8e2b34ac68061..332a66fadac737c802304a54ef11ed83495dbbd8 100644 (file)
@@ -32,7 +32,7 @@
 
 # define TEST_SYSCALL_NR __NR_stat
 # define TEST_SYSCALL_STR "stat"
-# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418)
+# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418ULL)
 # include "lstatx.c"
 
 #else
index 4c2101bb675bbbbee4f89082f817d84a22842eb5..dc9059de1ba46551a283f1a4ce6c29fe82adcb4b 100644 (file)
@@ -35,7 +35,7 @@
 # define STRUCT_STAT struct stat64
 # define STRUCT_STAT_STR "struct stat64"
 # define STRUCT_STAT_IS_STAT64 1
-# define SAMPLE_SIZE ((libc_off_t) 43147718418)
+# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL)
 # include "lstatx.c"
 
 #else
index aae71a03441041b349ca1fb922d1e3f65cc40197..34cf58e6b43f38477d71be576476106c396f519c 100644 (file)
@@ -45,7 +45,7 @@
 static long
 invoke_test_syscall(const unsigned int cmd, void *const p)
 {
-       const unsigned long op = (unsigned long) 0xffffffff00000000 | cmd;
+       const unsigned long op = (unsigned long) 0xffffffff00000000ULL | cmd;
 
        return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p);
 }
@@ -55,8 +55,8 @@ test_flock_einval(const int cmd, const char *name)
 {
        struct_kernel_flock fl = {
                .l_type = F_RDLCK,
-               .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeed,
-               .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00d
+               .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeedULL,
+               .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00dULL
        };
        invoke_test_syscall(cmd, &fl);
        printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET"
index d0116d07bbd605498d8ff8b67452b388dd35e6b7..6e5d617db44b5b8159481eba9fa03eee8874b967 100644 (file)
@@ -9,7 +9,7 @@
 int
 main(void)
 {
-       const long int fd = (long int) 0xdeadbeefffffffff;
+       const long int fd = (long int) 0xdeadbeefffffffffULL;
        static const char oldpath[] = "symlink_old";
        static const char newpath[] = "symlink_new";
 
index aadef68cdf485d81a2def8fd4b3becff7d4f9bc6..67d31a89bde61b10b979b5c2a9ee51db5eee6f48 100644 (file)
@@ -39,8 +39,8 @@ int
 main(void)
 {
        const int fd = -1;
-       const off64_t offset = 0xdeadbeefbadc0ded;
-       const off64_t nbytes = 0xfacefeedcafef00d;
+       const off64_t offset = 0xdeadbeefbadc0dedULL;
+       const off64_t nbytes = 0xfacefeedcafef00dULL;
        const unsigned int flags = -1;
 
        int rc = sync_file_range(fd, offset, nbytes, flags);
index d4d4a7bb72265b54ca8ca8a869c97afbe751f95d..5df96cb8c5ab92c2307ae1bf453fc86e110cad82 100644 (file)
@@ -11,7 +11,7 @@
 int
 main(void)
 {
-       const long addr = (long) 0xfacefeeddeadbeef;
+       const long addr = (long) 0xfacefeeddeadbeefULL;
        int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1);
        printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n",
               addr, rc, errno2name());
index eb562c7cea750319bd4abaaf2573c98d26657383..66d1c94f91d06bfef599a758d8ca16350a2dacb0 100644 (file)
@@ -38,8 +38,8 @@
 int
 main(void)
 {
-       const long int fd_in = (long int) 0xdeadbeefffffffff;
-       const long int fd_out = (long int) 0xdeadbeeffffffffe;
+       const long int fd_in = (long int) 0xdeadbeefffffffffULL;
+       const long int fd_out = (long int) 0xdeadbeeffffffffeULL;
        const size_t len = (size_t) 0xdeadbef3facefed3ULL;
        const unsigned int flags = 15;
 
index 6f98f3680f80089a68a57ba6d2fc90cf2a6bc0be..f13b7b040f9ec87354c69d6aaf743ad3ee65207a 100644 (file)
@@ -49,7 +49,7 @@ main(void)
        struct_sigevent sev = {
                .sigev_notify = 0xdefaced,
                .sigev_signo = 0xfacefeed,
-               .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded
+               .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL
        };
 
        syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL);
@@ -81,8 +81,10 @@ main(void)
               sev.sigev_value.sival_ptr, tid[1]);
 
        sev.sigev_notify = SIGEV_THREAD;
-       sev.sigev_un.sigev_thread.function = (unsigned long) 0xdeadbeefbadc0ded;
-       sev.sigev_un.sigev_thread.attribute = (unsigned long) 0xcafef00dfacefeed;
+       sev.sigev_un.sigev_thread.function =
+               (unsigned long) 0xdeadbeefbadc0dedULL;
+       sev.sigev_un.sigev_thread.attribute =
+               (unsigned long) 0xcafef00dfacefeedULL;
        if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2]))
                perror_msg_and_skip("timer_create CLOCK_REALTIME");
        printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}"
index c4a524d53f37fe865f9871cf718f5dfaa84a0eb5..8c29ea81b8182de20c4e15d9d3bd649084992be2 100644 (file)
@@ -38,7 +38,7 @@ main(void)
 {
        static const char fname[] = "truncate64\nfilename";
        static const char qname[] = "truncate64\\nfilename";
-       const off_t len = 0xdefaceddeadbeef;
+       const off_t len = 0xdefaceddeadbeefULL;
 
        int rc = truncate(fname, len);
        printf("truncate64(\"%s\", %llu) = %d %s (%m)\n",
index 7ab27dc0091815a1c454ee0e76d42045d6789ec4..5041638eed62ada414ca5f67833606b74953df2f 100644 (file)
@@ -43,7 +43,7 @@ static const char sample[] = TEST_SYSCALL_STR;
 static void
 test_syscall(unsigned short mode)
 {
-       unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode;
+       unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode;
        long rc = syscall(TEST_SYSCALL_NR, TEST_SYSCALL_PREFIX_ARGS
                          sample, lmode);
 
index 0b69b0373758a1da1cf661dc5486213a725d9784..22c3de399cf29c840ee19105fbf8b9168c2ea018 100644 (file)
@@ -10,7 +10,7 @@ int
 main(void)
 {
        static const char sample[] = "unlinkat_sample";
-       const long fd = (long) 0xdeadbeefffffffff;
+       const long fd = (long) 0xdeadbeefffffffffULL;
 
        long rc = syscall(__NR_unlinkat, fd, sample, 0);
        printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n",
index b379f1a183e9a5c4c8fd61269768e0769e8e9231..c7fc507b2fa8edb9e130bce0bd2105f25f14baa9 100644 (file)
@@ -138,7 +138,7 @@ sprint_siginfo(const siginfo_t *const si, const char *const status_text)
 static unsigned long
 poison(unsigned int v)
 {
-       return (unsigned long) 0xfacefeed00000000 | v;
+       return (unsigned long) 0xfacefeed00000000ULL | v;
 }
 
 static long
index dbcdf87390421f0db51db1b44368a224c964ee63..2e22e245316d2650ad09b5719d265c448bb4b693 100644 (file)
@@ -40,7 +40,7 @@ int
 main(void)
 {
        unsigned long pid =
-               (unsigned long) 0xdefaced00000000 | (unsigned) getpid();
+               (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid();
        long rc = syscall(__NR_waitpid, pid, 0L, (unsigned long) WNOHANG);
        printf("waitpid(%d, NULL, WNOHANG) = %ld %s (%m)\n",
               (int) pid, rc, errno2name());
index d4d5545cd1756f4b857420e1fd8c0febf9abc77a..24e0d7f0bc3fd8196c7b139f82f94b9e8b1dc7ce 100644 (file)
@@ -40,12 +40,12 @@ main(void)
 {
        const int pid = getpid();
        long rc = syscall(__NR_getpgid,
-                         (unsigned long) 0xffffffff00000000 | pid);
+                         (unsigned long) 0xffffffff00000000ULL | pid);
        printf("getpgid(%d) = %ld\n", pid, rc);
 
        rc = syscall(__NR_setpgid,
-                    (unsigned long) 0xffffffff00000000,
-                    (unsigned long) 0xffffffff00000000 | pid);
+                    (unsigned long) 0xffffffff00000000ULL,
+                    (unsigned long) 0xffffffff00000000ULL | pid);
        printf("setpgid(0, %d) = %ld\n", pid, rc);
 
        puts("+++ exited with 0 +++");
index dfd32642abe7e0a3d52129bbe17e5f1b2c432743..ed5525988a0a6dc71f69f05a801f6cf5414d1d99 100644 (file)
@@ -12,12 +12,12 @@ main(void)
 {
        const int pid = getpid();
        long rc = syscall(__NR_getpriority, PRIO_PROCESS,
-                         (unsigned long) 0xffffffff00000000 | pid);
+                         (unsigned long) 0xffffffff00000000ULL | pid);
        printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc);
 
        rc = syscall(__NR_setpriority, PRIO_PROCESS,
-                    (unsigned long) 0xffffffff00000000 | pid,
-                    (unsigned long) 0xffffffff00000000);
+                    (unsigned long) 0xffffffff00000000ULL | pid,
+                    (unsigned long) 0xffffffff00000000ULL);
        printf("setpriority(PRIO_PROCESS, %d, 0) = %s\n", pid, sprintrc(rc));
 
        puts("+++ exited with 0 +++");
index d787ce38b50b077071be466e13e941c94b4f1aef..54ced9a7bca104c2de45f4647596545e1396c84f 100644 (file)
@@ -68,7 +68,7 @@ main(void)
        const struct xlat *xlat;
 
        for (xlat = resources; xlat->str; ++xlat) {
-               unsigned long res = 0xfacefeed00000000 | xlat->val;
+               unsigned long res = 0xfacefeed00000000ULL | xlat->val;
                long rc = syscall(NR_GETRLIMIT, res, 0);
                if (rc && ENOSYS == errno)
                        perror_msg_and_skip(STR_GETRLIMIT);
index c5c04be2f3b48708f14ddfa91cbaeda42bf57e75..372fc916d71c48c25b90e135271b9a87710ecf68 100644 (file)
@@ -110,7 +110,7 @@ main(void)
        printf("NULL) = %s\n", errstr);
 
 #ifdef CHECK_ODD_SIZE
-       const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef;
+       const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL;
        rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1);
        errstr = sprintrc(rc);
        PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1);
index 2fda6f813c567062bcfdf4b4742013fca61cea87..12da191cfb8740d77e360a66b788deb6c9ad98e9 100644 (file)
@@ -71,7 +71,7 @@ print_time(const time_t t)
 #  define STRUCT_STAT_IS_STAT64 0
 # endif
 # ifndef SAMPLE_SIZE
-#  define SAMPLE_SIZE 43147718418
+#  define SAMPLE_SIZE 43147718418ULL
 # endif
 
 typedef off_t libc_off_t;