seL4 / util_libs

Other
53 stars 83 forks source link

libplatsupport: use proper format specifier #180

Closed axel-h closed 4 months ago

axel-h commented 4 months ago

This avoid a build warning with clang, which can also be found in CI (see e.g. https://github.com/seL4/seL4/actions/runs/8085439570/job/22092970792)

  [78/256] Building C object apps/sel4test-driver/util_libs/libplatsupport/CMakeFiles/platsupport.dir/src/plat/hifive/ltimer.c.obj
  /github/workspace/projects/util_libs/libplatsupport/src/plat/hifive/ltimer.c:104:55: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
          ZF_LOGE("Invalid IRQ number: %d received.\n", irq_number);
                                       ~~               ^~~~~~~~~~
                                       %ld
  /github/workspace/projects/util_libs/libutils/include/utils/zf_log.h:359:43: note: expanded from macro 'ZF_LOGE'
                          _ZF_LOG_IMP(ZF_LOG_ERROR, _ZF_LOG_TAG, __VA_ARGS__)
                                                                 ^~~~~~~~~~~
  /github/workspace/projects/util_libs/libutils/include/utils/zf_log.h:302:18: note: expanded from macro '_ZF_LOG_IMP'
                                                          lvl, tag, __VA_ARGS__); \
                                                                    ^~~~~~~~~~~