aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 20:26:38 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 20:26:38 +0000
commit7b4cc2dbc728a9f3ae0157c4422963b156a0bf54 (patch)
tree49471f10960af424cb49fa96f51039ac3fd887af /channels/chan_sip.c
parent6eb561092de2b45c0bb0acb38bc585ecf2af3e36 (diff)
Make chan_sip build under dev mode with compilers >= GCC 4.2
Thanks to jpeeler for alerting me of this git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@123485 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index baf4e3576..c30e8f35e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -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 = "";