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/
https://bugs.winehq.org/show_bug.cgi?id=37122
Luke lukebenes@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.viva64.com/en/b/ | |0272/
https://bugs.winehq.org/show_bug.cgi?id=37122
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |794d52273efccf5ef6e5ed56783 | |b3f4c7130cc4d Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- Fixed.
https://bugs.winehq.org/show_bug.cgi?id=37122
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.30.
https://bugs.winehq.org/show_bug.cgi?id=37122
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |iphlpapi