Skip to content

Commit 13939f1

Browse files
authored
Merge pull request #237 from yizhanglinux/compile-warning-fix
Compile warning fix
2 parents 8eca9fa + d5e7400 commit 13939f1

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ C_TARGETS := \
1919
nbdsetsize \
2020
openclose \
2121
sg/dxfer-from-dev \
22-
sg/syzkaller1 \
2322
zbdioctl
2423

2524
C_URING_TARGETS := metadata \
@@ -32,7 +31,10 @@ HAVE_UBLK_HEADER := $(call HAVE_C_HEADER,linux/ublk_cmd.h,1)
3231
CXX_TARGETS := \
3332
discontiguous-io
3433

35-
TARGETS := $(C_TARGETS) $(CXX_TARGETS)
34+
SYZKALLER_TARGETS := \
35+
sg/syzkaller1
36+
37+
TARGETS := $(C_TARGETS) $(CXX_TARGETS) $(SYZKALLER_TARGETS)
3638

3739
ifeq ($(HAVE_UBLK_HEADER), 1)
3840
C_URING_TARGETS += $(C_UBLK_TARGETS)
@@ -70,6 +72,9 @@ $(C_TARGETS): %: %.c
7072
$(CXX_TARGETS): %: %.cpp
7173
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
7274

75+
$(SYZKALLER_TARGETS): %: %.c
76+
$(CC) $(CFLAGS) -Wno-unused-but-set-variable $(LDFLAGS) -o $@ $^
77+
7378
$(C_URING_TARGETS): %: %.c
7479
$(CC) $(CFLAGS) $(LDFLAGS) $(URING_FLAGS) -o $@ $^ $(URING_LIBS)
7580

src/metadata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int check_metadata(void *p, int intervals, int ref)
246246

247247
if (v != ref) {
248248
fprintf(stderr, "reftag interval:%d expected:%x got:%llx\n",
249-
i, ref, v);
249+
i, ref, (unsigned long long)v);
250250
return -1;
251251
}
252252
remaining -= sizeof(*tuple);

0 commit comments

Comments
 (0)