Skip to content

Commit 81b5c63

Browse files
Update checkuninitvar.cpp
1 parent 79ca30a commit 81b5c63

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/checkuninitvar.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,8 @@ int CheckUninitVar::isFunctionParUsage(const Token *vartok, const Library& libra
14221422
const bool isnullbad = library.isnullargbad(start->previous(), argumentNumber + 1);
14231423
if (indirect == 0 && pointer && !address && isnullbad && alloc == NO_ALLOC)
14241424
return 1;
1425+
if (vartok->varId() == 0 && vartok->valueType())
1426+
indirect = vartok->valueType()->pointer;
14251427
bool hasIndirect = false;
14261428
const bool isuninitbad = library.isuninitargbad(start->previous(), argumentNumber + 1, indirect, &hasIndirect);
14271429
if (alloc != NO_ALLOC)

0 commit comments

Comments
 (0)