[Home]

Summary:ASTERISK-18065: 1.4 fails to build with gcc 4.6 in dev-mode: chan_phone.c:307:9: error: the comparison will always evaluate as 'true'
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2011-06-25 04:35:35Date Closed:2011-07-11 14:10:49
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_phone
Versions:SVN Frequency of
Occurrence
Related
Issues:
Environment:./configure --enable-dev-mode gcc 4.6 on Debian Testing: gcc-4.6.real (Debian 4.6.0-10) 4.6.1 20110526 (prerelease)Attachments:( 0) chan_phone.diff
Description:Building of Asterisk 1.4 from SVN fails with the following error:

chan_phone.c: In function 'phone_call':
chan_phone.c:307:9: error: the comparison will always evaluate as 'true' for the address of 'tm' will never be NULL [-Werror=address]
cc1: all warnings being treated as errors


This seems to be caused due to a bug in the code. A patch to fix it is attached.

Apart from this one, there are plenty of warnings about unused variables. But I suppose they would be left alone for now.
Comments:By: Tzafrir Cohen (tzafrir) 2011-06-25 04:48:50.906-0500

Fixes a bug in chan_phone that has upset gcc-4.6

By: Leif Madsen (lmadsen) 2011-07-11 14:10:49.366-0500

As this is a against Asterisk 1.4 (which is no longer in maintenance support mode) I'm closing this issue. Thanks for providing the patch for anyone who may run into this issue on their local environments. It will allow them to utilize the changes in their local environments.