I'm getting a few compiler warnings when building latest master on
Debian 11.

-- Juha

-------------------------------

CC (gcc) [M dispatcher.so]              ds_ht.o
In file included from ../../core/mem/shm.h:43,
                 from ../../core/mem/shm_mem.h:32,
                 from ds_ht.c:25:
ds_ht.c: In function 'ds_ht_dbg':
../../core/mem/../dprint.h:321:24: warning: format '%llu' expects argument of 
type 'long long unsigned int', but argument 12 has type 'long unsigned int' 
[-Wformat=]
  321 |        fprintf(stderr, "%2d(%d) %s: %.*s%s%s%s" fmt, \
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
../../core/mem/../dprint.h:345:4: note: in expansion of macro 'LOG_FX'
  345 |    LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:351:4: note: in expansion of macro 'LOG_FL'
  351 |    LOG_FL(facility, level, NULL, prefix, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:354:4: note: in expansion of macro 'LOG_FP'
  354 |    LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:392:31: note: in expansion of macro 'LOG'
  392 | # define ERR(fmt, args...)    LOG(L_ERR,    fmt , ## args)
      |                               ^~~
../../core/mem/../dprint.h:418:16: note: in expansion of macro 'ERR'
  418 | #define LM_ERR ERR
      |                ^~~
ds_ht.c:337:4: note: in expansion of macro 'LM_ERR'
  337 |    LM_ERR("\thid: %u expire: %llu initexpire: %llu\n", it->cellid,
      |    ^~~~~~
../../core/mem/../dprint.h:321:24: warning: format '%llu' expects argument of 
type 'long long unsigned int', but argument 13 has type 'long unsigned int' 
[-Wformat=]
  321 |        fprintf(stderr, "%2d(%d) %s: %.*s%s%s%s" fmt, \
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
../../core/mem/../dprint.h:345:4: note: in expansion of macro 'LOG_FX'
  345 |    LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:351:4: note: in expansion of macro 'LOG_FL'
  351 |    LOG_FL(facility, level, NULL, prefix, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:354:4: note: in expansion of macro 'LOG_FP'
  354 |    LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:392:31: note: in expansion of macro 'LOG'
  392 | # define ERR(fmt, args...)    LOG(L_ERR,    fmt , ## args)
      |                               ^~~
../../core/mem/../dprint.h:418:16: note: in expansion of macro 'ERR'
  418 | #define LM_ERR ERR
      |                ^~~
ds_ht.c:337:4: note: in expansion of macro 'LM_ERR'
  337 |    LM_ERR("\thid: %u expire: %llu initexpire: %llu\n", it->cellid,
      |    ^~~~~~

-------------------------------

CC (gcc) [M jsonrpcs.so]                jsonrpcs_mod.o
jsonrpcs_mod.c: In function 'jsonrpc_send_mode':
jsonrpcs_mod.c:418:44: warning: format '%lld' expects argument of type 'long 
long int', but argument 4 has type 'long int' [-Wformat=]
  418 |      snprintf(_jsonrpcs_stored_id, 62, "%lld", 
(int64_t)nj->valuedouble);
      |                                         ~~~^   ~~~~~~~~~~~~~~~~~~~~~~~~
      |                                            |   |
      |                                            |   long int
      |                                            long long int
      |                                         %ld
jsonrpcs_mod.c:428:42: warning: '%s' directive output may be truncated writing 
up to 63 bytes into a region of size 61 [-Wformat-truncation=]
  428 |     snprintf(_jsonrpcs_stored_id, 62, "\"%s\"", ctx->jsrid_val);
      |                                          ^~
jsonrpcs_mod.c:428:5: note: 'snprintf' output between 3 and 66 bytes into a 
destination of size 62
  428 |     snprintf(_jsonrpcs_stored_id, 62, "\"%s\"", ctx->jsrid_val);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-------------------------------

CC (gcc) [M local.so]           functions.o
In file included from ../../core/mem/pkg.h:32,
                 from ../../core/mem/mem.h:41,
                 from functions.c:26:
functions.c: In function 'set_attr':
../../core/mem/../dprint.h:321:24: warning: format '%d' expects argument of 
type 'int', but argument 11 has type 'long int' [-Wformat=]
  321 |        fprintf(stderr, "%2d(%d) %s: %.*s%s%s%s" fmt, \
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
../../core/mem/../dprint.h:345:4: note: in expansion of macro 'LOG_FX'
  345 |    LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:351:4: note: in expansion of macro 'LOG_FL'
  351 |    LOG_FL(facility, level, NULL, prefix, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:354:4: note: in expansion of macro 'LOG_FP'
  354 |    LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ## args)
      |    ^~~~~~
../../core/mem/../dprint.h:392:31: note: in expansion of macro 'LOG'
  392 | # define ERR(fmt, args...)    LOG(L_ERR,    fmt , ## args)
      |                               ^~~
../../core/mem/../dprint.h:418:16: note: in expansion of macro 'ERR'
  418 | #define LM_ERR ERR
      |                ^~~
functions.c:69:6: note: in expansion of macro 'LM_ERR'
   69 |      LM_ERR("add_avp <%d> failed\n", name.n);
      |      ^~~~~~
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to