# HG changeset patch # User Luke Mewburn # Date 1582003433 -39600 # Node ID 3cbe458fbfa984b8b2a7c5ab0cb2e766fa409c4b # Parent 6cc290653ef65bcd98c0bdd3718e1be013e0bb31 Fix compiler warnings diff -r 6cc290653ef6 -r 3cbe458fbfa9 extensions/acl_wl/aw_tree.c --- a/extensions/acl_wl/aw_tree.c Tue Feb 11 20:01:06 2020 +1100 +++ b/extensions/acl_wl/aw_tree.c Tue Feb 18 16:23:53 2020 +1100 @@ -339,7 +339,7 @@ { struct split_name sn; int lbl, found; - struct tree_item * ti; + struct tree_item * ti = NULL; struct fd_list * senti, *li; TRACE_ENTRY("%p %p", name, result); diff -r 6cc290653ef6 -r 3cbe458fbfa9 extensions/app_diameap/diameap_server.c --- a/extensions/app_diameap/diameap_server.c Tue Feb 11 20:01:06 2020 +1100 +++ b/extensions/app_diameap/diameap_server.c Tue Feb 18 16:23:53 2020 +1100 @@ -3064,7 +3064,7 @@ struct sess_state * diameap_sess_data = NULL; struct diameap_state_machine * diameap_sm = NULL; struct diameap_eap_interface eap_i; - struct msg *req, *ans; + struct msg *req, *ans = NULL; boolean non_fatal_error = FALSE; if (rmsg == NULL) diff -r 6cc290653ef6 -r 3cbe458fbfa9 extensions/app_radgw/rgw_clients.c --- a/extensions/app_radgw/rgw_clients.c Tue Feb 11 20:01:06 2020 +1100 +++ b/extensions/app_radgw/rgw_clients.c Tue Feb 18 16:23:53 2020 +1100 @@ -548,7 +548,7 @@ int idx; int valid_nas_info = 0; struct radius_attr_hdr *nas_ip = NULL, *nas_ip6 = NULL, *nas_id = NULL; - size_t nas_id_len; + size_t nas_id_len = 0; char * oh_str = NULL; size_t oh_strlen = 0; int oh_free = 0; char * or_str = NULL; size_t or_strlen = 0; char * rr_str = NULL; size_t rr_strlen = 0; diff -r 6cc290653ef6 -r 3cbe458fbfa9 extensions/app_sip/multimediaauth.c --- a/extensions/app_sip/multimediaauth.c Tue Feb 11 20:01:06 2020 +1100 +++ b/extensions/app_sip/multimediaauth.c Tue Feb 18 16:23:53 2020 +1100 @@ -50,7 +50,7 @@ union avp_value val; int found_cnonce=0; struct avp * tempavp=NULL,*sipAuthentication=NULL,*sipAuthenticate=NULL; - char * result; + char * result = NULL; char password[51]; int idx=0, number_of_auth_items=0,i=0, ret=0; //Flags and variables for Database diff -r 6cc290653ef6 -r 3cbe458fbfa9 extensions/dbg_monitor/dbg_monitor.c --- a/extensions/dbg_monitor/dbg_monitor.c Tue Feb 11 20:01:06 2020 +1100 +++ b/extensions/dbg_monitor/dbg_monitor.c Tue Feb 18 16:23:53 2020 +1100 @@ -75,7 +75,9 @@ static pthread_t thr; static void * mn_thr(void * arg) { +#ifdef DEBUG int i = 0; +#endif fd_log_threadname("Monitor thread"); char * buf = NULL; size_t len; diff -r 6cc290653ef6 -r 3cbe458fbfa9 libfdcore/hooks.c --- a/libfdcore/hooks.c Tue Feb 11 20:01:06 2020 +1100 +++ b/libfdcore/hooks.c Tue Feb 18 16:23:53 2020 +1100 @@ -332,7 +332,9 @@ /* There was no registered handler, default behavior for this hook */ switch (type) { case HOOK_DATA_RECEIVED: { +#ifdef DEBUG struct fd_cnx_rcvdata *rcv_data = other; +#endif LOG_A("RCV: %zd bytes", rcv_data->length); break; } diff -r 6cc290653ef6 -r 3cbe458fbfa9 libfdcore/p_ce.c --- a/libfdcore/p_ce.c Tue Feb 11 20:01:06 2020 +1100 +++ b/libfdcore/p_ce.c Tue Feb 18 16:23:53 2020 +1100 @@ -704,7 +704,7 @@ int fd_p_ce_msgrcv(struct msg ** msg, int req, struct fd_peer * peer) { uint32_t rc = 0; - int st; + int st = STATE_NEW; struct fd_pei pei; TRACE_ENTRY("%p %p", msg, peer); diff -r 6cc290653ef6 -r 3cbe458fbfa9 libfdcore/sctp3436.c --- a/libfdcore/sctp3436.c Tue Feb 11 20:01:06 2020 +1100 +++ b/libfdcore/sctp3436.c Tue Feb 18 16:23:53 2020 +1100 @@ -137,7 +137,7 @@ static void * decipher(void * arg) { struct sctp3436_ctx * ctx = arg; - struct cnxctx *cnx; + struct cnxctx *cnx = NULL; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO(ctx && ctx->raw_recv && ctx->parent, goto error); diff -r 6cc290653ef6 -r 3cbe458fbfa9 libfdproto/dictionary_functions.c --- a/libfdproto/dictionary_functions.c Tue Feb 11 20:01:06 2020 +1100 +++ b/libfdproto/dictionary_functions.c Tue Feb 18 16:23:53 2020 +1100 @@ -287,7 +287,7 @@ int fd_dictfct_Time_encode(void * data, union avp_value * avp_value) { - char * buf; + char * buf = NULL; size_t len; TRACE_ENTRY("%p %p", data, avp_value); diff -r 6cc290653ef6 -r 3cbe458fbfa9 libfdproto/fifo.c --- a/libfdproto/fifo.c Tue Feb 11 20:01:06 2020 +1100 +++ b/libfdproto/fifo.c Tue Feb 18 16:23:53 2020 +1100 @@ -170,7 +170,9 @@ int fd_fifo_del ( struct fifo ** queue ) { struct fifo * q; +#ifdef DEBUG int loops = 0; +#endif TRACE_ENTRY( "%p", queue ); @@ -225,7 +227,9 @@ /* Move the content of old into new, and update loc_update atomically. We leave the old queue empty but valid */ int fd_fifo_move ( struct fifo * old, struct fifo * new, struct fifo ** loc_update ) { +#ifdef DEBUG int loops = 0; +#endif TRACE_ENTRY("%p %p %p", old, new, loc_update); CHECK_PARAMS( CHECK_FIFO( old ) && CHECK_FIFO( new )); @@ -416,6 +420,9 @@ pthread_cleanup_pop(0); queue->thrs_push-- ; +#ifndef DEBUG + (void)ret; +#endif ASSERT( ret == 0 ); } } diff -r 6cc290653ef6 -r 3cbe458fbfa9 libfdproto/messages.c --- a/libfdproto/messages.c Tue Feb 11 20:01:06 2020 +1100 +++ b/libfdproto/messages.c Tue Feb 18 16:23:53 2020 +1100 @@ -2284,7 +2284,9 @@ /* First, check if we already have a model. */ if (msg->msg_model != NULL) { /* Check if this model is still valid for the message data */ +#ifdef DEBUG enum dict_object_type dicttype; +#endif struct dict_cmd_data data; ASSERT(((fd_dict_gettype(msg->msg_model, &dicttype) == 0) && (dicttype == DICT_COMMAND))); (void)fd_dict_getval( msg->msg_model, &data);