Module: kamailio
Branch: master
Commit: e9593714c55e29ccfd626131cceea2bd59b736e0
URL: 
https://github.com/kamailio/kamailio/commit/e9593714c55e29ccfd626131cceea2bd59b736e0

Author: Henning Westerholt <h...@gilawa.com>
Committer: Henning Westerholt <h...@gilawa.com>
Date: 2025-08-04T19:51:51Z

misctest: fix error, for loop initial declarations are only allowed in C99 mode

---

Modified: src/modules/misctest/misctest_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/e9593714c55e29ccfd626131cceea2bd59b736e0.diff
Patch: 
https://github.com/kamailio/kamailio/commit/e9593714c55e29ccfd626131cceea2bd59b736e0.patch

---

diff --git a/src/modules/misctest/misctest_mod.c 
b/src/modules/misctest/misctest_mod.c
index e02bb52fd41..e57e03bc51a 100644
--- a/src/modules/misctest/misctest_mod.c
+++ b/src/modules/misctest/misctest_mod.c
@@ -989,6 +989,7 @@ static int mem_test_destroy(int id)
 
 static int lock_test(int executions)
 {
+       int i = 0;
        gen_lock_t *my_lock = NULL;
        my_lock = lock_alloc();
 
@@ -997,7 +998,7 @@ static int lock_test(int executions)
                return -1;
        }
        LM_INFO("Start lock test, %d executions\n", executions);
-       for(int i = 0; i < executions; i++) {
+       for(i = 0; i < executions; i++) {
                lock_get(my_lock);
                lock_release(my_lock);
        }

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to