Skip to content

Compile warning found in blktests on ppc64le #233

Description

@yizhanglinux

Hi
I found the following warning when I do make in blktests on ppc64le:

# uname -r
7.0.0-0.rc4.260320g0e4f8f1a3d08.40.fc45.ppc64le

# gcc --version
gcc (GCC) 16.0.1 20260305 (Red Hat 16.0.1-0)

# make
make -C src all
make[1]: Entering directory '/root/blktests/src'
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o dio-offsets dio-offsets.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o loblksize loblksize.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o loop_change_fd loop_change_fd.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o loop_get_status_null loop_get_status_null.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o mount_clear_sock mount_clear_sock.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o nvme-passthrough-meta nvme-passthrough-meta.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o ioctl-lbmd-query ioctl-lbmd-query.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o nbdsetsize nbdsetsize.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o openclose openclose.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o sg/dxfer-from-dev sg/dxfer-from-dev.c
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o sg/syzkaller1 sg/syzkaller1.c
sg/syzkaller1.c: In function ‘doexit’:
sg/syzkaller1.c:66:21: warning: variable ‘i’ set but not used [-Wunused-but-set-variable=]
   66 |   volatile unsigned i;
      |                     ^
cc  -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -o zbdioctl zbdioctl.c
g++  -O2 -std=c++11 -Wall -Wextra -Wshadow -Wno-sign-compare -Werror  -DHAVE_LINUX_BLKZONED_H  -o discontiguous-io discontiguous-io.cpp
cc -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -D_GNU_SOURCE -o miniublk miniublk.c -lpthread -luring
cc -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -D_GNU_SOURCE -o metadata metadata.c -lpthread -luring
metadata.c: In function ‘check_metadata’:
metadata.c:248:96: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
  248 |                                         fprintf(stderr, "reftag interval:%d expected:%x got:%llx\n",
      |                                                                                             ~~~^
      |                                                                                                |
      |                                                                                                long long unsigned int
      |                                                                                             %lx
  249 |                                                 i, ref, v);
      |                                                         ~
      |                                                         |
      |                                                         __u64 {aka long unsigned int}
cc -O2 -Wall -Wshadow  -DHAVE_LINUX_BLKZONED_H  -D_GNU_SOURCE -o nvme-passthru-admin-uring nvme-passthru-admin-uring.c -lpthread -luring
make[1]: Leaving directory '/root/blktests/src'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions