[sr-dev] git:master:91bec00a: kex: fix compiler warning
Victor Seva
linuxmaniac at torreviejawireless.org
Wed Sep 27 14:01:23 CEST 2017
Module: kamailio
Branch: master
Commit: 91bec00a1451f026ccfa5c42d1b945d15ced664e
URL: https://github.com/kamailio/kamailio/commit/91bec00a1451f026ccfa5c42d1b945d15ced664e
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2017-09-27T13:57:54+02:00
kex: fix compiler warning
> core_stats.c: In function 'stats_fetch_all':
> core_stats.c:521:7: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if(m==NULL) {
> ^
> CC (gcc) [M kex.so] mod_stats.o
---
Modified: src/modules/kex/core_stats.c
---
Diff: https://github.com/kamailio/kamailio/commit/91bec00a1451f026ccfa5c42d1b945d15ced664e.diff
Patch: https://github.com/kamailio/kamailio/commit/91bec00a1451f026ccfa5c42d1b945d15ced664e.patch
---
diff --git a/src/modules/kex/core_stats.c b/src/modules/kex/core_stats.c
index fb311f0be4..ad8f42964d 100644
--- a/src/modules/kex/core_stats.c
+++ b/src/modules/kex/core_stats.c
@@ -518,10 +518,10 @@ static void stats_fetch_all(rpc_t* rpc, void* ctx, char* stat)
s_statistic.len = strlen(n);
s_stat = get_stat(&s_statistic);
if (s_stat) {
+ m = get_stat_module(s_stat);
if(m==NULL) {
return;
}
- m = get_stat_module(s_stat);
for(i=0; m[i]!=0 && stat[i]!=0; i++) {
if(stat[i]!=m[i]) {
/* module name mismatch */
More information about the sr-dev
mailing list