Commit 52862c16 authored by jehan's avatar jehan

fix gcc warning. Avoid sip Expire header to be parsed in case of http

parent c94f3b28
......@@ -103,7 +103,7 @@ belle_sip_error_code belle_generic_uri_marshal(const belle_generic_uri_t* uri, c
}
if (uri->path) {
error=belle_sip_snprintf(buff,buff_size,offset,"/",NULL);
error=belle_sip_snprintf(buff,buff_size,offset,"/");
if (error!=BELLE_SIP_OK) return error;
if (*(uri->path+1) != '\0') { /*+1 to skip leading /*/
char* escaped_path=belle_generic_uri_to_escaped_path(uri->path+1);
......
noinst_LTLIBRARIES=libbellesip_generated.la
libbellesip_generated_la_CFLAGS=$(LIBBELLESIP_CFLAGS) $(ANTLR_CFLAGS)
libbellesip_generated_la_CFLAGS=$(LIBBELLESIP_CFLAGS) $(ANTLR_CFLAGS) $(STRICT_OPTIONS)
nodist_libbellesip_generated_la_SOURCES= \
......@@ -23,7 +23,7 @@ nodist_libbellesip_generated_la_SOURCES= \
AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src
EXTRA_DIST= belle_sip_lexer.g belle_sdp.g belle_sip_message.g sip.g http.g common.g
EXTRA_DIST= belle_sip_lexer.g belle_sdp.g belle_sip_message.g
CLEANFILES=$(nodist_libbellesip_generated_la_SOURCES) *.tokens
......@@ -45,6 +45,7 @@ options {
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wunused"
#pragma GCC diagnostic ignored "-Wtautological-compare"
#pragma GCC diagnostic ignored "-Wunused-variable"
}
@parser::header {
......@@ -68,6 +69,9 @@ options {
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wunused"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
}
@rulecatch
{
......
......@@ -45,6 +45,9 @@ options {
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wunused"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
}
@lexer::header {
/*
......@@ -181,7 +184,7 @@ message_header [belle_sip_message_t* message]
// | header_via {belle_sip_message_add_header(message,BELLE_SIP_HEADER($header_via.ret));}/*
// | warning
// | www_authenticate*/
header_extension[TRUE,(BELLE_SIP_OBJECT_IS_INSTANCE_OF($message,belle_http_resquest_t) ||BELLE_SIP_OBJECT_IS_INSTANCE_OF($message,belle_http_response_t)) ] {
header_extension[TRUE,(BELLE_SIP_OBJECT_IS_INSTANCE_OF($message,belle_http_request_t) ||BELLE_SIP_OBJECT_IS_INSTANCE_OF($message,belle_http_response_t)) ] {
belle_sip_header_t* lheader = BELLE_SIP_HEADER($header_extension.ret);
do {
if (lheader == NULL) break; /*sanity check*/
......@@ -365,17 +368,17 @@ scope { belle_generic_uri_t* current; }
//****************SIP**********************/
generic_param [belle_sip_parameters_t* object] returns [belle_sip_param_pair_t* ret]
scope{int is_value;}
@init { $generic_param::is_value=0; $ret=NULL;}
: token ( equal gen_value {$generic_param::is_value = 1;} )? {
generic_param [belle_sip_parameters_t* object] returns [belle_sip_param_pair_t* ret=NULL]
scope{int is_value; char* gen_value_string;}
@init { $generic_param::is_value=0; $generic_param::gen_value_string=NULL;}
: token ( equal gen_value {$generic_param::gen_value_string=(char*)($gen_value.text->chars);} )? {
if (object == NULL) {
$ret=belle_sip_param_pair_new((const char*)($token.text->chars)
,$generic_param::is_value?(const char*)($gen_value.text->chars):NULL);
,$generic_param::gen_value_string);
} else {
belle_sip_parameters_set_parameter(object
,(const char*)($token.text->chars)
,$generic_param::is_value?(const char*)($gen_value.text->chars):NULL);
,$generic_param::gen_value_string);
$ret=NULL;
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment