[Bug 37119] New: PVS-Studio Error: Cascade of conditional operators
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Aug 16 13:08:55 CDT 2014
https://bugs.winehq.org/show_bug.cgi?id=37119
Bug ID: 37119
Summary: PVS-Studio Error: Cascade of conditional operators
Product: Wine
Version: 1.7.22
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs at winehq.org
Reporter: lukebenes at hotmail.com
V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is
a probability of logical error presence. Check lines: 1754, 1765. msi.c 1754
if (!strcmpW( szProperty, INSTALLPROPERTY_LOCALPACKAGEW )) //<==
{
...
}
else if (!strcmpW( szProperty, INSTALLPROPERTY_INSTALLDATEW ))
{
...
}
else
if (!strcmpW( szProperty, INSTALLPROPERTY_LOCALPACKAGEW )) //<==
{
...
}
else if (!strcmpW( szProperty, INSTALLPROPERTY_UNINSTALLABLEW ) ||
!strcmpW( szProperty, INSTALLPROPERTY_PATCHSTATEW ) ||
!strcmpW( szProperty, INSTALLPROPERTY_DISPLAYNAMEW ) ||
!strcmpW( szProperty, INSTALLPROPERTY_MOREINFOURLW ))
{
...
}
else
{
...
}
If identical conditions are checked in a cascade of conditional operators,
those conditions never get control. Perhaps there is a typo in the constant
INSTALLPROPERTY_* passed to this fragment.
details on the V517 error here: http://www.viva64.com/en/d/0106/
--
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