On 04/04/2012 12:16 PM, Daniel-Constantin Mierla wrote:
Hello,

I fixed the ones not in msg_translator.c, they were valid.

For msg_translator.c, I am not yet sure why they are thrown, recv_* vars
are set for condition 'if (msg->rcv.bind_address)' and used only within
that condition. What is your gcc version? I have 4.2 here and no warning
there.

Hello Daniel,

I get the same warnings on actions.c and msg_translator.c.

mzbihlei@lxbu-czc111663q:~$ gcc --version
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.


msg_translator.c: In function ‘lumps_len’:
msg_translator.c:582:7: warning: ‘recv_address_str’ may be used uninitialized in this function msg_translator.c:583:7: warning: ‘recv_port_str’ may be used uninitialized in this function msg_translator.c:584:7: warning: ‘recv_port_no’ may be used uninitialized in this function
msg_translator.c: In function ‘process_lumps’:
msg_translator.c:921:7: warning: ‘recv_address_str’ may be used uninitialized in this function msg_translator.c:922:7: warning: ‘recv_port_str’ may be used uninitialized in this function msg_translator.c:923:7: warning: ‘recv_port_no’ may be used uninitialized in this function


I have pushed a fix for the actions.c (the problem is that on line 1617 ) . I will have a look at msg_translator as well .


Marius

I can init them always, but it is better to understand first why the
warning is given, not to fall in a trap with a default value.

Cheers,
Daniel

On 4/3/12 4:07 PM, Juha Heinanen wrote:
recently there has been commits that cause compiler warnings shown
below.

please fix or revert the commits.

-- juha

action.c: In function ‘run_actions’:
action.c:1583: warning: ‘ms’ may be used uninitialized in this function
CC (cc) [sip-proxy]             msg_translator.o
msg_translator.c: In function ‘lumps_len’:
msg_translator.c:582: warning: ‘recv_address_str’ may be used uninitialized in 
this function
msg_translator.c:583: warning: ‘recv_port_str’ may be used uninitialized in 
this function
msg_translator.c:584: warning: ‘recv_port_no’ may be used uninitialized in this 
function
msg_translator.c: In function ‘process_lumps’:
msg_translator.c:921: warning: ‘recv_address_str’ may be used uninitialized in 
this function
msg_translator.c:922: warning: ‘recv_port_str’ may be used uninitialized in 
this function
msg_translator.c:923: warning: ‘recv_port_no’ may be used uninitialized in this 
function
CC (cc) [L libsrdb1.so.1.0]             db_query.o
db_query.c: In function ‘db_do_submit_query’:
db_query.c:50: warning: ‘ms’ may be used uninitialized in this function
CC (cc) [M textops.so]          textops.o
textops.c: In function ‘subst_hf_f’:
textops.c:2242: warning: ‘hfl’ may be used uninitialized in this function
textops.c: In function ‘search_hf_f’:
textops.c:2161: warning: ‘hfl’ may be used uninitialized in this function

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


--
Zbihlei Marius

Head of
Linux Development Services Romania

1&1 Internet Development srl    Tel KA: 754-9152
Str Mircea Eliade 18            Tel RO: +40-31-223-9152
Sect 1, Bucuresti               mailto: [email protected]
71295, Romania


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to