Summary: | ASTERISK-05474: app_externalivr.c - compatibility fix for older gcc versions. | ||
Reporter: | Luigi Rizzo (rizzo) | Labels: | |
Date Opened: | 2005-11-06 09:11:49.000-0600 | Date Closed: | 2008-01-15 15:54:07.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_externalivr.patch | |
Description: | app_externalivr (not a new app, but there is no category for that) uses a varadic macro, ast_chan_log() as a wrapper around ast_log. Apparently the parser in gcc 2.95 gets confused with the sequence channel->name, ## __VA_ARGS__) when the vararg list is empty, causing the errors below. Adding a space before the last comma fixes things. It is definitely a compiler's bug (gcc 3.4.4 is fine with the original code) but it costs nothing to fix it, and i have no idea which other gcc versions are affected. Note, the patch includes a comment to explain why the space is needed. Please keep it when you apply the patch. ****** ADDITIONAL INFORMATION ****** gcc -O -pipe -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O2 -Werror -I/usr/local/include -L/usr/local/lib -march=i386 -D_THREAD_SAFE -fomit-frame-pointer -I/usr/local/include -L/usr/local/lib -fPIC -c -o app_externalivr.o app_externalivr.c cc1: warnings being treated as errors app_externalivr.c: In function `app_exec': app_externalivr.c:298: warning: char format, ast_channel arg (arg 6) app_externalivr.c:341: warning: char format, ast_channel arg (arg 6) app_externalivr.c:348: warning: char format, ast_channel arg (arg 6) app_externalivr.c:353: warning: char format, ast_channel arg (arg 6) app_externalivr.c:361: warning: char format, ast_channel arg (arg 6) app_externalivr.c:367: warning: char format, ast_channel arg (arg 6) app_externalivr.c:393: warning: char format, ast_channel arg (arg 6) app_externalivr.c:414: warning: char format, ast_channel arg (arg 6) app_externalivr.c:425: warning: char format, ast_channel arg (arg 6) app_externalivr.c:487: warning: char format, ast_channel arg (arg 6) | ||
Comments: | By: Russell Bryant (russell) 2005-11-06 09:41:14.000-0600 fixed in cvs head, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:54:07.000-0600 Repository: asterisk Revision: 6978 U trunk/ChangeLog U trunk/apps/app_externalivr.c ------------------------------------------------------------------------ r6978 | russell | 2008-01-15 15:54:07 -0600 (Tue, 15 Jan 2008) | 2 lines issue ASTERISK-5474 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=6978 |