]> git.ipfire.org Git - thirdparty/iw.git/commit
iw: event: fix printf format error
authorStefan Weil <sw@weilnetz.de>
Sat, 21 Jan 2023 19:36:37 +0000 (20:36 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 14 Feb 2023 10:44:39 +0000 (11:44 +0100)
commitd6fd2757f7aab638022ffa635e32e21594ec382d
treee2630f12d0d4ce5ba7bcbdb2f8c9880e67bfaa3c
parentcc660ccb9a83ec23b672eef178e9b494d95e763d
iw: event: fix printf format error

tv_usec can be a 64 bit integer which causes a compiler warning:

event.c: In function 'print_event':
event.c:930:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'suseconds_t' {aka 'long long int'} [-Wformat=]
  930 |                         printf("[%s.%06lu]: ", buf, args->ts.tv_usec);
      |                                     ~~~~^           ~~~~~~~~~~~~~~~~
      |                                         |                   |
      |                                         long unsigned int   suseconds_t {aka long long int}
      |                                     %06llu

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Link: https://lore.kernel.org/r/20230121193637.347109-1-sw@weilnetz.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
event.c