[Home]

Summary:ASTERISK-05307: [GCC4.1][1.0.9] local variable used before set
Reporter:dcb314 (dcb314)Labels:
Date Opened:2005-10-18 04:26:00Date Closed:2008-01-15 15:51:57.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hello there,

I just tried to compile package asterisk-1.0.9-4 with the GNU C
compiler version 4.1. It said

1.

chan_iax2.c:6625: warning: "found" is used uninitialized in this function

The source code is

found++;

I'm not sure what the fix for this should be, but it is clear that code
rework is required. Suggest initialise local variable "found" before first use.

2.

msgsm.h:573: warning: "xmc[ 48]" is used uninitialized in this function

The source code is

writeGSM_33(d);// LARc etc. -> array of 33 GSM bytes

Suggest initialise xmc[ 48] before first use.
Comments:By: Russell Bryant (russell) 2005-10-21 13:49:33

fixed in v1-0 cvs

By: Digium Subversion (svnbot) 2008-01-15 15:51:57.000-0600

Repository: asterisk
Revision: 6840

U   branches/v1-0/channels/chan_iax2.c

------------------------------------------------------------------------
r6840 | russell | 2008-01-15 15:51:57 -0600 (Tue, 15 Jan 2008) | 2 lines

removed unused variable (issue ASTERISK-5307)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6840