From e550db072bed511547454cd12d59510eff46a27b Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Thu, 11 May 2023 11:58:31 +0200 Subject: [PATCH] MT#57404 warning: format '%llu' expects argument of type 'long long unsigned int' This fixes that: AmOfferAnswer.cpp: In member function 'int AmOfferAnswer::onReplyOut(AmSipReply&)': log.h:143:30: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=] 143 | _LOG(L_DBG, error_category " " fmt, ##args) log.h:121:45: note: in definition of macro '_LOG' 121 | int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \ | ^~~ log.h:166:29: note: in expansion of macro 'CAT_DBG' 166 | #define DBG(fmt, args...) CAT_DBG(ERROR_CATEGORY_DGENERAL, fmt, ##args) | ^~~~~~~ AmOfferAnswer.cpp:367:9: note: in expansion of macro 'DBG' 367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n", | ^~~ AmOfferAnswer.cpp:367:88: note: format string is defined here 367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n", | ~~~^ | | | long long unsigned int | %u In file included from AmArg.h:43, from AmSipMsg.h:3, from AmOfferAnswer.h:32, from AmOfferAnswer.cpp:29: log.h:143:30: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=] 143 | _LOG(L_DBG, error_category " " fmt, ##args) log.h:121:45: note: in definition of macro '_LOG' 121 | int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \ | ^~~ log.h:166:29: note: in expansion of macro 'CAT_DBG' 166 | #define DBG(fmt, args...) CAT_DBG(ERROR_CATEGORY_DGENERAL, fmt, ##args) | ^~~~~~~ AmOfferAnswer.cpp:367:9: note: in expansion of macro 'DBG' 367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n", | ^~~ AmOfferAnswer.cpp:367:103: note: format string is defined here 367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n", | ~~~^ | | | long long unsigned int | %u Change-Id: I15c6e37756a55ea5c917b123030b30e0ddc55724 --- core/AmOfferAnswer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/AmOfferAnswer.cpp b/core/AmOfferAnswer.cpp index 57322cbb..06d36aaf 100644 --- a/core/AmOfferAnswer.cpp +++ b/core/AmOfferAnswer.cpp @@ -364,7 +364,7 @@ int AmOfferAnswer::onReplyOut(AmSipReply& reply) } else { force_no_sdp_update = (sdp_local.origin.sessV == parser_sdp.origin.sessV); if (force_no_sdp_update) - DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n", + DBG("Forcing no OA state update (no SDP changes, same session version: was <%u>, now is <%u>).\n", sdp_local.origin.sessV, parser_sdp.origin.sessV); } }