Module: sip-router Branch: master Commit: deb007275ae6444037e74c82a48fc879a0cc98ad URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=deb00727...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu Sep 19 12:34:33 2013 +0200
parser: ppi/pai - fix warning dereferencing type-punned pointer will break strict-aliasing rules
---
parser/parse_ppi_pai.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/parser/parse_ppi_pai.c b/parser/parse_ppi_pai.c index cce0b6c..f1b8d91 100644 --- a/parser/parse_ppi_pai.c +++ b/parser/parse_ppi_pai.c @@ -114,6 +114,7 @@ int parse_pai_header(struct sip_msg* const msg) p_id_body_t *pai_b; p_id_body_t **prev_pid_b; hdr_field_t *hf; + void **vp;
if ( !msg->pai ) { @@ -130,7 +131,8 @@ int parse_pai_header(struct sip_msg* const msg) if ( msg->pai->parsed ) return 0;
- prev_pid_b = (p_id_body_t**)(&msg->pai->parsed); + vp = &msg->pai->parsed; + prev_pid_b = (p_id_body_t**)vp;
for (hf = msg->pai; hf != NULL; hf = next_sibling_hdr(hf)) {