Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: mod_freetdm
-
Labels:None
-
Environment:Centos
-
Platform:Linux x86/gcc
-
CPU Info:N/A
-
GCC Version:gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)
-
FreeSWITCH GIT Revision:Head
-
Reproduced with GIT HEAD?:Yes
-
lsb_release:N/A
Description
making install mod_freetdm
CC ftmod_sangoma_isdn_la-ftmod_sangoma_isdn.lo
cc1: warnings being treated as errors
src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c: In function 'ftdm_sangoma_isdn_io_run':
src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c:345: warning: 'i' may be used uninitialized in this function
make[6]: *** [ftmod_sangoma_isdn_la-ftmod_sangoma_isdn.lo] Error 1
make[5]: *** [local_install] Error 2
make[4]: *** [install] Error 1
make[3]: *** [mod_freetdm-install] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
Fix is to initialize variable "i".
--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c
+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c
@@ -342,7 +342,7 @@ static void ftdm_sangoma_isdn_wakeup_phy(ftdm_channel_t *dchan)
static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
{
uint8_t data[1000];
- unsigned i;
+ unsigned i = 0;
ftdm_status_t status = FTDM_SUCCESS;
ftdm_wait_flag_t wflags = FTDM_READ;
ftdm_span_t *span = (ftdm_span_t*) obj;
CC ftmod_sangoma_isdn_la-ftmod_sangoma_isdn.lo
cc1: warnings being treated as errors
src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c: In function 'ftdm_sangoma_isdn_io_run':
src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c:345: warning: 'i' may be used uninitialized in this function
make[6]: *** [ftmod_sangoma_isdn_la-ftmod_sangoma_isdn.lo] Error 1
make[5]: *** [local_install] Error 2
make[4]: *** [install] Error 1
make[3]: *** [mod_freetdm-install] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
Fix is to initialize variable "i".
--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c
+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c
@@ -342,7 +342,7 @@ static void ftdm_sangoma_isdn_wakeup_phy(ftdm_channel_t *dchan)
static void *ftdm_sangoma_isdn_io_run(ftdm_thread_t *me, void *obj)
{
uint8_t data[1000];
- unsigned i;
+ unsigned i = 0;
ftdm_status_t status = FTDM_SUCCESS;
ftdm_wait_flag_t wflags = FTDM_READ;
ftdm_span_t *span = (ftdm_span_t*) obj;
Branch: refs/heads/master
Commit: c77fdb5 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=c77fdb5
Closed By: jeff@jefflenk.com
Comment:
OPENZAP-163--resolve trivial compile warning