From: wadam Date: Tue, 8 Nov 2011 03:26:02 +0000 (-0500) Subject: Fix error in call reference conversion to string. X-Git-Tag: v1.2.3^2~71^2^2~217^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c4a3f81a2e5c2077eb5949dfbc54101a17d3bdc;p=thirdparty%2Ffreeswitch.git 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 --- 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); }