@@ -424,6 +424,9 @@ static const Token* doAssignment(Variables &variables, const Token *tok, bool de
424424 Variables::VariableUsage *var1 = variables.find (varid1);
425425
426426 if (var1) {
427+ if (var1->mType == Variables::pointerArray)
428+ variables.use (varid1, tok);
429+
427430 // jump behind '='
428431 tok = tok->next ();
429432 while (!tok->isAssignmentOp ()) {
@@ -567,8 +570,10 @@ static const Token* doAssignment(Variables &variables, const Token *tok, bool de
567570 } else if (var1->mType == Variables::standard && addressOf) {
568571 variables.alias (varid1, varid2, true );
569572 } else {
570- if ((var2->mType == Variables::pointer || var2->mType == Variables::pointerArray) && tok->strAt (1 ) == " [" )
573+ if (var2->mType == Variables::pointer || var2->mType == Variables::pointerArray) {
574+ variables.alias (varid1, varid2, true );
571575 variables.readAliases (varid2, tok);
576+ }
572577
573578 variables.read (varid2, tok);
574579 }
@@ -1393,7 +1398,7 @@ void CheckUnusedVar::checkFunctionVariableUsage()
13931398
13941399 // skip things that are only partially implemented to prevent false positives
13951400 if (usage.mType == Variables::pointerPointer ||
1396- usage.mType == Variables::pointerArray ||
1401+ // usage.mType == Variables::pointerArray ||
13971402 usage.mType == Variables::referenceArray)
13981403 continue ;
13991404
0 commit comments