From 5c4a3f81a2e5c2077eb5949dfbc54101a17d3bdc Mon Sep 17 00:00:00 2001 From: wadam Date: Mon, 7 Nov 2011 22:26:02 -0500 Subject: [PATCH] Fix error in call reference conversion to string. src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c cc1: warnings being treated as errors src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c: In function 'handle_con_ind': src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c:255: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'U32' make[6]: *** [ftmod_sangoma_ss7_la-ftmod_sangoma_ss7_handle.lo] Error 1 --- .../src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c index f351d8ab8d..25967e5977 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c @@ -252,7 +252,9 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ sngss7_add_var(sngss7_info, "ss7_opc", var); if (siConEvnt->callRef.callId.pres) { - sprintf(var, "%x", siConEvnt->callRef.callId.val); + /* %x expect an unsigned int so as callId is a U32, casting to uint32_t + * is safe */ + sprintf(var, "%x", (uint32_t)siConEvnt->callRef.callId.val); sngss7_add_var(sngss7_info, "ss7_callref", var); }