drivers/rc: fix compile warning

In file included from /home/archer/code/nuttx/n4/incubator-nuttx/drivers/rc/lirc_dev.c:29:
drivers/rc/lirc_dev.c: In function 'lirc_raw_event':
drivers/rc/lirc_dev.c:959:14: warning: format '%u' expects argument of type 'unsigned int',
                              but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  959 |       rcinfo("delivering %uus %d to lirc\n", ev.duration, ev.pulse ? 1 : 0);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
      |                                                |
      |                                                uint32_t {aka long unsigned int}
drivers/rc/lirc_dev.c:959:27: note: format string is defined here
  959 |       rcinfo("delivering %uus %d to lirc\n", ev.duration, ev.pulse ? 1 : 0);
      |                          ~^
      |                           |
      |                           unsigned int
      |                          %lu

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2022-08-03 20:06:46 +08:00 committed by Xiang Xiao
parent a6da6dcec6
commit 742ca6e319
1 changed files with 2 additions and 1 deletions

View File

@ -956,7 +956,8 @@ void lirc_raw_event(FAR struct lirc_lowerhalf_s *lower,
} }
sample = ev.pulse ? LIRC_PULSE(ev.duration) : LIRC_SPACE(ev.duration); sample = ev.pulse ? LIRC_PULSE(ev.duration) : LIRC_SPACE(ev.duration);
rcinfo("delivering %uus %d to lirc\n", ev.duration, ev.pulse ? 1 : 0); rcinfo("delivering %" PRIu32 "us %u to lirc\n",
ev.duration, ev.pulse ? 1 : 0);
} }
flags = enter_critical_section(); flags = enter_critical_section();