Skip to content

Commit c20bb22

Browse files
committed
Fix printf-style formats to match argument when building on
32-bit arches.
1 parent 18f4c3d commit c20bb22

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

cfg_pp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static int flatten_opensips_cfg(FILE *cfg, const char *cfg_path, str *out)
458458

459459
if (strlen(out->s) != out->len) {
460460
LM_BUG("preprocessed buffer check failed (%lu vs. %d)",
461-
strlen(out->s), out->len);
461+
(unsigned long)strlen(out->s), out->len);
462462
LM_ERR("either this is a bug or your script contains '\\0' chars, "
463463
"which are obviously NOT allowed!\n");
464464
return -1;

db/db_val.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static inline void db_print_val(db_val_t *v)
108108
LM_GEN1(L_DBG, "\t'%.*s'\n", v->val.str_val.len, v->val.str_val.s);
109109
break;
110110
case DB_DATETIME:
111-
LM_GEN1(L_DBG, "\t'%ld'\n", v->val.time_val);
111+
LM_GEN1(L_DBG, "\t'%ld'\n", (long)v->val.time_val);
112112
break;
113113
case DB_BLOB:
114114
LM_GEN1(L_DBG, "\t'%.*s'\n", v->val.blob_val.len, v->val.blob_val.s);

mem/rpm_mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ int init_rpm_mallocs(void)
507507
if (fst.st_size != rpm_mem_size) {
508508
LM_WARN("restart persistency cache (%s) size %ld is different than "
509509
"the size we are running with %ld: creating a new cache!\n",
510-
rpm_mem_file, fst.st_size, rpm_mem_size);
510+
rpm_mem_file, (long)fst.st_size, rpm_mem_size);
511511
} else if (load_rpm_file() == 0)
512512
return 0; /* memblock loaded just fine */
513513
LM_INFO("restart persistent cache is invalid: creating a new one!\n");

parser/sdp/sdp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ int parse_sdp_session(str *sdp_body, int session_num, str *cnt_disp, sdp_info_t*
403403
if (*v1p == '\r' || *v1p == '\n')
404404
v1p++;
405405
if (v1p + 1 >= bodylimit) {
406-
LM_ERR("body too short %ld!\n", bodylimit - v1p);
406+
LM_ERR("body too short %ld!\n", (long)(bodylimit - v1p));
407407
return -1;
408408
}
409409
if (*v1p != 'v' || *(v1p+1) != '=') {

reactor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int init_reactor_size(void)
8787
if (reactor_size < lim.rlim_cur) {
8888
LM_WARN("shrinking reactor size from %lu (autodetected via rlimit) "
8989
"to %d (limited by memory of %d%% from %luMb)\n",
90-
lim.rlim_cur, reactor_size, FD_MEM_PERCENT, mem_size/1024/1024);
90+
(unsigned long)lim.rlim_cur, reactor_size, FD_MEM_PERCENT, mem_size/1024/1024);
9191
LM_WARN("use 'open_files_limit' to enforce other limit or "
9292
"increase %s memory\n", mem_type);
9393
} else {

time_rec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ time_t tz_adjust_ts(time_t unix_time, const str *tz)
264264
if (local_tm.tm_isdst > 0)
265265
adj_ts -= 3600;
266266

267-
LM_DBG("UNIX ts: %ld, local-adjusted ts: %ld (tz: '%.*s', DST: %s)\n", unix_time,
268-
adj_ts, tz ? tz->len : 4, tz ? tz->s : "null",
269-
local_tm.tm_isdst == 1 ? "on" :
267+
LM_DBG("UNIX ts: %ld, local-adjusted ts: %ld (tz: '%.*s', DST: %s)\n",
268+
(long int)unix_time, (long int)adj_ts, tz ? tz->len : 4,
269+
tz ? tz->s : "null", local_tm.tm_isdst == 1 ? "on" :
270270
local_tm.tm_isdst == 0 ? "off" : "unavail");
271271

272272
return adj_ts;

0 commit comments

Comments
 (0)