Hopefully the dispatcher and jsonrpcs warnings are fixed. I guess that
local.so is a custom module, you have to change the logging/printf()
specifiers from %d to%ld because some internal fields in kamailio were
changed from int to long int for a better support of values specific to
64b CPU architectures, which are the common nowadays.
Cheers,
Daniel
On 07.04.23 16:41, Juha Heinanen wrote:
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-leave(a)lists.kamailio.org
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 -
www.kamailioworld.com