]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix error in call reference conversion to string.
authorwadam <wadam@sangoma.com>
Tue, 8 Nov 2011 03:26:02 +0000 (22:26 -0500)
committerwadam <wadam@sangoma.com>
Tue, 8 Nov 2011 03:26:02 +0000 (22:26 -0500)
  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

libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c

index f351d8ab8d0b58c80ea635606842c21b228fdb1c..25967e5977b49ce5b7d2db3fccc5be08e3f42805 100644 (file)
@@ -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);
                        }