[Bug 37127] New: PVS-Studio Error: Unreliable tests
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Aug 16 13:30:41 CDT 2014
https://bugs.winehq.org/show_bug.cgi?id=37127
Bug ID: 37127
Summary: PVS-Studio Error: Unreliable tests
Product: Wine
Version: 1.7.22
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs at winehq.org
Reporter: lukebenes at hotmail.com
PVS-Studio identifies Unreliable tests. Some of the modules' folders contain
the test folder with source files for tests. Debug information is printed
through the 'ok' macro. Here are a few suspicious fragments:
V501 There are identical sub-expressions to the left and to the right of the
'==' operator: ddsd3.lpSurface == ddsd3.lpSurface dsurface.c 272
...
ok(ddsd3.lpSurface == ddsd3.lpSurface, //<==
"lpSurface from GetSurfaceDesc(%p) differs\
from the one returned by Lock(%p)\n",
ddsd3.lpSurface, ddsd2.lpSurface); //<==
...
It very much looks like a typo. I suspect this code should compare the same
variables that are printed.
V502 Perhaps the '?:' operator works in a different way than it was expected.
The '?:' operator has a lower priority than the '==' operator. url.c 767
...
ok(size == no_callback ? 512 : 13, "size=%d\n", size);
...
The precedence of the "==" operator is higher than that of '?:', so the size
variable is not compared to the values 512 and 13. The expression is always
true as it evaluates either to 512 or 13, which means this check doesn't check
anything.
Other similar fragments:
V502 Perhaps the '?:' operator works in a different way than it was
expected. The '?:' operator has a lower priority than the '==' operator.
string.c 1086
V502 Perhaps the '?:' operator works in a different way than it was
expected. The '?:' operator has a lower priority than the '==' operator.
string.c 1111
V502 Perhaps the '?:' operator works in a different way than it was
expected. The '?:' operator has a lower priority than the '==' operator.
reader.c 761
V502 Perhaps the '?:' operator works in a different way than it was
expected. The '?:' operator has a lower priority than the '==' operator.
protocol.c 2928
V502 Perhaps the '?:' operator works in a different way than it was
expected. The '?:' operator has a lower priority than the '==' operator. dde.c
1594
V502 Perhaps the '?:' operator works in a different way than it was
expected. The '?:' operator has a lower priority than the '==' operator.
reader.c 761
details on the V501 error here: http://www.viva64.com/en/d/0090/
details on the V502 error here: http://www.viva64.com/en/d/0091/
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list