Either by renaming or removing the variable or adding an extra scope to the top variable. CPPCheck warning type: shadowVar.