mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-03 21:46:35 -07:00
Make chan_sip build under dev mode with compilers >= GCC 4.2
Thanks to jpeeler for alerting me of this git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@123485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+3
-1
@@ -12735,8 +12735,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
|
||||
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 = "";
|
||||
|
||||
Reference in New Issue
Block a user