https://bugs.winehq.org/show_bug.cgi?id=37122
Bug ID: 37122 Summary: PVS-Studio Error: One counter for two loops Product: Wine Version: 1.7.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: lukebenes@hotmail.com
PVS-Studio identifies a V535 Error, one counter for two loops. The variable 'i' is being used for this loop and for the outer loop. Check lines: 980, 1003. iphlpapi_main.c 1003
... for (i = 0; i < num_v6addrs; i++) //<== { ... for (i = 0; i < 8 && !done; i++) //<== { ... } ... if (i < num_v6addrs - 1) { prefix->Next = (IP_ADAPTER_PREFIX *)ptr; prefix = prefix->Next; } } ...
This fragment is suspicious: a nested loop is organized through the i variable which is also used in the external loop.
details on the V535 error here: http://www.viva64.com/en/d/0124/