[asterisk-commits] mmichelson: branch 1.4 r123485 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 17 15:26:39 CDT 2008


Author: mmichelson
Date: Tue Jun 17 15:26:38 2008
New Revision: 123485

URL: http://svn.digium.com/view/asterisk?view=rev&rev=123485
Log:
Make chan_sip build under dev mode with compilers >= GCC 4.2
Thanks to jpeeler for alerting me of this


Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=123485&r1=123484&r2=123485
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Jun 17 15:26:38 2008
@@ -12735,8 +12735,10 @@
 	int sipmethod;
 	int res = 1;
 	const char *c = get_header(req, "Cseq");
+	/* GCC 4.2 complains if I try to cast c as a char * when passing it to ast_skip_nonblanks, so make a copy of it */
+	char *c_copy = ast_strdupa(c);
 	/* Skip the Cseq and its subsequent spaces */
-	const char *msg = ast_skip_blanks(ast_skip_nonblanks((char *)c));
+	const char *msg = ast_skip_blanks(ast_skip_nonblanks(c_copy));
 
 	if (!msg)
 		msg = "";




More information about the asterisk-commits mailing list