Module: kamailio
Branch: master
Commit: 597625d08bd639ddb46609e6af22af0dad28b870
URL:
https://github.com/kamailio/kamailio/commit/597625d08bd639ddb46609e6af22af0…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-01-12T16:12:38+01:00
app_jsdt: fix compiler warning
In file included from app_jsdt_api.c:28:0:
app_jsdt_api.c: In function 'app_jsdt_rpc_reload':
../../core/dprint.h:316:8: warning: 'v' may be used uninitialized in this
function [-Wmaybe-uninitialized]
_km_log_func(LOG2SYSLOG_LEVEL(__llevel) |\
^~~~~~~~~~~~
app_jsdt_api.c:1298:6: note: 'v' was declared here
int v;
^
---
Modified: src/modules/app_jsdt/app_jsdt_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/597625d08bd639ddb46609e6af22af0…
Patch:
https://github.com/kamailio/kamailio/commit/597625d08bd639ddb46609e6af22af0…
---
diff --git a/src/modules/app_jsdt/app_jsdt_api.c b/src/modules/app_jsdt/app_jsdt_api.c
index a903375..ad5ec34 100644
--- a/src/modules/app_jsdt/app_jsdt_api.c
+++ b/src/modules/app_jsdt/app_jsdt_api.c
@@ -1309,11 +1309,10 @@ static void app_jsdt_rpc_reload(rpc_t* rpc, void* ctx)
return;
}
+ v = *_sr_jsdt_reload_version;
LM_INFO("marking for reload js script file: %.*s (%d => %d)\n",
_sr_jsdt_load_file.len, _sr_jsdt_load_file.s,
_sr_jsdt_local_version, v);
-
- v = *_sr_jsdt_reload_version;
*_sr_jsdt_reload_version += 1;
if (rpc->add(ctx, "{", &vh) < 0) {