Fix: relayd: wrong specifier used in DBG format string
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jul 2020 18:26:17 +0000 (14:26 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jul 2020 18:32:42 +0000 (14:32 -0400)
commit164683ec6721ba447ba2c6d9d08a98aa2caa397a
treea42a0a5189d76064a5ba332950681e68b6bc6094
parent60ef7bf796f47dc526c44656724f1994b1745e89
Fix: relayd: wrong specifier used in DBG format string

`len` is of type uint64_t while the format string specifies a size of
`%zd`. This results in a warning on most 32-bit architectures.

  In file included from ../../../src/common/common.h:12:0,
                   from live.c:33:
  live.c: In function `viewer_get_metadata`:
  ../../../src/common/error.h:161:35: warning: format `%zd` expects
  argument of type `signed size_t`, but argument 6 has type `uint64_t
  {aka long long unsigned int}` [-Wformat=]
   #define DBG(fmt, args...) _ERRMSG("DEBUG1", PRINT_DBG, fmt, ## args)
                                     ^
  ../../../src/common/error.h:136:51: note: in definition of macro `__lttng_print`
      fprintf((type) == PRINT_MSG ? stdout : stderr, fmt, ## args); \
                                                     ^~~
  ../../../src/common/error.h:161:27: note: in expansion of macro `_ERRMSG`
   #define DBG(fmt, args...) _ERRMSG("DEBUG1", PRINT_DBG, fmt, ## args)
                             ^~~~~~~
  live.c:2051:4: note: in expansion of macro `DBG`
      DBG("Failed to read metadata: requested = %zd, got = %zd",
      ^~~

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I108191e0a94e712b0596d0d52a21cf8c971d6c1e
src/bin/lttng-relayd/live.c
This page took 0.025445 seconds and 4 git commands to generate.