[Home]

Summary:ASTERISK-00312: [patch] Problems building libpri with late versions of GCC
Reporter:Ben Klang (bklang)Labels:
Date Opened:2003-09-25 16:36:48Date Closed:2004-09-25 02:46:18
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The newer versions of GCC choke on comparisons between signed and unsigned.

Line 2045 of libpri.c:
for (x=0;x<sizeof(msgs) / sizeof(msgs[0]); x++)  {

x is cast in this function as an int; msgs is an unsigned int.  Other places in the code, x is cast as an unsigned int.
Solution: Line 1911 of q931.c:
- int x,y;
+ unsigned int x;
+ int y;

Once this is done it builds cleanly.  Without this, it errors out during compile.
Comments:By: Mark Spencer (markster) 2003-10-06 00:14:07

Fixed in CVS