#include "test.h"
static int test(){
test_t i;
init(i);
}
static test_t init(test_t const a){
test_c(&a);
return a;
}
When I use Cppcheck to check this file ,it reports uninitialized variable at init(i);
.
But it does not report uninitialized variable when I delete the declaration of init
.
#include "test.h"
static int test(){
test_t i;
init(i);
}
Is there any solution for cppcheck reports uninitialized variable when calling external functions?