[OpenSER-Devel] trunk compilation issues
Dan Pascu
dan at ag-projects.com
Fri Oct 12 12:47:23 CEST 2007
I get these 2 warnings while compile the presence modules (1st in
presence, 2nd in presence_xml):
1.
publish.c: In function 'handle_publish':
publish.c:418: warning: comparison with string literal results in
unspecified behaviour
which corresponds to:
if(sender_uri && sender_uri!= "")
This is obviously bogus as you can't compare with a string literal like
that, even more considering that sender_uri is of type pv_elem_t*
In this case it'll always compare them as pointers and this test will
always succeed as they have different addresses.
2.
notify_body.c: In function 'get_final_notify_body':
notify_body.c:377: warning: the address of 'service_uri_scheme' will
always evaluate as 'true'
which corresponds to:
if(xmlStrcasecmp(provide_node->name,
(unsigned char*)"service-uri-scheme")==0
&& service_uri_scheme)
where service_uri_scheme is a local variable defined like:
char service_uri_scheme[10];
which means service_uri_scheme is always a non-NULL pointer.
I'm not sure what these 2 tests should actually test, so I couldn't figure
out how to fix them.
Can someone who knows the indepths of these modules please take a look?
--
Dan
More information about the Devel
mailing list