Skip to content

Commit b7eccf7

Browse files
committed
samples: Fix warning in fsnotify sample
The fsnotify sample code generates the following warning on powerpc: samples/fanotify/fs-monitor.c: In function 'handle_notifications': samples/fanotify/fs-monitor.c:68:36: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type '__u64' {aka 'long unsigned int'} [-Wformat=] 68 | printf("unexpected FAN MARK: %llx\n", event->mask); | ~~~^ ~~~~~~~~~~~ | | | | | __u64 {aka long unsigned int} | long long unsigned int | %lx Fix the problem by explicitely typing the argument to proper type. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent 9abeae5 commit b7eccf7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/fanotify/fs-monitor.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ static void handle_notifications(char *buffer, int len)
6565
for (; FAN_EVENT_OK(event, len); event = FAN_EVENT_NEXT(event, len)) {
6666

6767
if (event->mask != FAN_FS_ERROR) {
68-
printf("unexpected FAN MARK: %llx\n", event->mask);
68+
printf("unexpected FAN MARK: %llx\n",
69+
(unsigned long long)event->mask);
6970
goto next_event;
7071
}
7172

0 commit comments

Comments
 (0)