From d1474f65376f7f7ed34fea53e22d5e563e7aeced Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Fri, 12 May 2023 15:45:13 +0200 Subject: [PATCH] MT#57424 format '%d' expects argument of type 'int', but argument 4 has type 'long int' This commit takes care of this: ../../core/log.h:143:30: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=] 143 | _LOG(L_DBG, error_category " " fmt, ##args) ../../core/log.h:121:45: note: in definition of macro '_LOG' 121 | int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \ | ^~~ ../../core/log.h:166:29: note: in expansion of macro 'CAT_DBG' 166 | #define DBG(fmt, args...) CAT_DBG(ERROR_CATEGORY_DGENERAL, fmt, ##args) | ^~~~~~~ DBRegAgent.cpp:298:4: note: in expansion of macro 'DBG' 298 | DBG("REGISTER: Triggering for subscriber with object_id=<%d>\n", object_id); | ^~~ DBRegAgent.cpp:298:62: note: format string is defined here 298 | DBG("REGISTER: Triggering for subscriber with object_id=<%d>\n", object_id); | ~^ | | | int | %ld ../../core/log.h:143:30: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=] 143 | _LOG(L_DBG, error_category " " fmt, ##args) ../../core/log.h:121:45: note: in definition of macro '_LOG' 121 | int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \ | ^~~ ../../core/log.h:166:29: note: in expansion of macro 'CAT_DBG' 166 | #define DBG(fmt, args...) CAT_DBG(ERROR_CATEGORY_DGENERAL, fmt, ##args) | ^~~~~~~ DBRegAgent.cpp:423:7: note: in expansion of macro 'DBG' 423 | DBG("REGISTER: Triggering for peering with object_id=<%d>\n", object_id); | ^~~ DBRegAgent.cpp:423:62: note: format string is defined here 423 | DBG("REGISTER: Triggering for peering with object_id=<%d>\n", object_id); | ~^ | | | int | %ld Change-Id: I088f9a1a2861d1f7aae7b7cab84ce0e66b3127c2 --- apps/db_reg_agent/DBRegAgent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/db_reg_agent/DBRegAgent.cpp b/apps/db_reg_agent/DBRegAgent.cpp index 56423609..23134144 100644 --- a/apps/db_reg_agent/DBRegAgent.cpp +++ b/apps/db_reg_agent/DBRegAgent.cpp @@ -295,7 +295,7 @@ bool DBRegAgent::loadRegistrations() { continue; } - DBG("REGISTER: Triggering for subscriber with object_id=<%d>\n", object_id); + DBG("REGISTER: Triggering for subscriber with object_id=<%ld>\n", object_id); string contact_uri; if (db_read_contact && row[COLNAME_CONTACT] != mysqlpp::null) { @@ -420,7 +420,7 @@ bool DBRegAgent::loadRegistrationsPeerings() { continue; } - DBG("REGISTER: Triggering for peering with object_id=<%d>\n", object_id); + DBG("REGISTER: Triggering for peering with object_id=<%ld>\n", object_id); string contact_uri; if (db_read_contact && row[COLNAME_CONTACT] != mysqlpp::null) {