[sr-dev] a bunch of db_redis compile Wformat warnings

Henning Westerholt hw at kamailio.org
Tue Apr 10 07:41:27 CEST 2018


Hi,

I noticed a bunch of db_redis Wformat compile warnings in the jenkins 
autobuild output:

CC (gcc) [M db_redis.so]                redis_dbase.o
redis_dbase.c: In function 'db_redis_dump_reply':
redis_dbase.c:39:9: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
         LM_DBG("printing %lu elements in array reply\n", reply->elements);
         ^
redis_dbase.c:39:9: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]
redis_dbase.c: In function 'db_redis_scan_query_keys':
redis_dbase.c:685:13: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 12 has type 'size_t' [-Wformat=]
             LM_ERR("Invalid number of reply elements for scan on table 
'%.*s', expected 2, got %lu\n",
             ^
redis_dbase.c:685:13: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
redis_dbase.c:717:17: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
                 LM_ERR("Invalid null key at cursor result index %lu while 
scanning table '%.*s'\n",
                 ^
redis_dbase.c:717:17: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]
redis_dbase.c:722:17: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
                 LM_ERR("Invalid key type at cursor result index %lu while 
scanning table '%.*s', expected string\n",
                 ^
redis_dbase.c:722:17: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]
redis_dbase.c: In function 'db_redis_convert_row':
redis_dbase.c:986:17: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
                 LM_DBG("column %lu does not match, ignore row\n", col);
                 ^
redis_dbase.c:986:17: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]
redis_dbase.c:1001:9: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 13 has type 'size_t' [-Wformat=]
         LM_ERR("Invalid number of columns at row %d/%d, expecting %d, got %lu
\n",
         ^
redis_dbase.c:1001:9: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 11 has type 'size_t' [-Wformat=]
redis_dbase.c:1012:9: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
         LM_DBG("converting column #%lu of row #%d", colidx, RES_ROW_N(_r));
         ^
redis_dbase.c:1012:9: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]
redis_dbase.c: In function 'db_redis_perform_delete':
redis_dbase.c:1317:21: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
                     LM_DBG("column %lu does not match, ignore row\n", col);
                     ^
redis_dbase.c:1317:21: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]
redis_dbase.c: In function 'db_redis_perform_update':
redis_dbase.c:1571:21: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 10 has type 'size_t' [-Wformat=]
                     LM_DBG("column %lu does not match, ignore row\n", col);
                     ^
redis_dbase.c:1571:21: warning: format '%lu' expects argument of type 'long 
unsigned int', but argument 8 has type 'size_t' [-Wformat=]

Best regards,

Henning



More information about the sr-dev mailing list