linux-stable/tools/gpio
Kent Gibson 1fc7c1ef37 tools: gpio: fix %llu warning in gpio-watch.c
Some platforms, such as mips64, don't map __u64 to long long unsigned
int so using %llu produces a warning:

gpio-watch.c: In function ‘main’:
gpio-watch.c:89:30: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   89 |    printf("line %u: %s at %llu\n",
      |                           ~~~^
      |                              |
      |                              long long unsigned int
      |                           %lu
   90 |           chg.info.offset, event, chg.timestamp_ns);
      |                                   ~~~~~~~~~~~~~~~~
      |                                      |
      |                                      __u64 {aka long unsigned int}

Replace the %llu with PRIu64 and cast the argument to uint64_t.

Fixes: 33f0c47b8f ("tools: gpio: implement gpio-watch")
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2021-01-18 10:05:35 +01:00
..
.gitignore This is the bulk of GPIO development for the v5.7 kernel cycle. 2020-04-04 10:27:00 -07:00
Build tools: gpio: implement gpio-watch 2020-02-12 12:05:47 +01:00
gpio-event-mon.c tools: gpio: fix %llu warning in gpio-event-mon.c 2021-01-18 10:05:29 +01:00
gpio-hammer.c tools: gpio: port gpio-hammer to v2 uAPI 2020-09-30 10:57:20 +02:00
gpio-utils.c tools: gpio: port gpio-hammer to v2 uAPI 2020-09-30 10:57:20 +02:00
gpio-utils.h tools: gpio: port gpio-hammer to v2 uAPI 2020-09-30 10:57:20 +02:00
gpio-watch.c tools: gpio: fix %llu warning in gpio-watch.c 2021-01-18 10:05:35 +01:00
lsgpio.c tools: gpio: add support for reporting realtime event clock to lsgpio 2020-12-05 23:22:47 +01:00
Makefile tools: gpio: Fix out-of-tree build regression 2020-03-27 22:27:19 +01:00