After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734467 - Incorrect comparison of Enum.
Incorrect comparison of Enum.
Status: RESOLVED DUPLICATE of bug 737403
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-08 08:21 UTC by Gaurav
Modified: 2014-10-06 04:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Correcting Usage of Enum. (1.02 KB, patch)
2014-08-08 08:21 UTC, Gaurav
none Details | Review

Description Gaurav 2014-08-08 08:21:19 UTC
Created attachment 282881 [details] [review]
Correcting Usage of Enum.

An Enum is checked as bool like:
if (ENUM)
In this case, many tools report error of "Misuse of Enum as boolean"

It should be checked like:
if (ENUM !=ZERO_VALUE)

Also, there is one missing break statement in the patch.

Please apply attached patch.
Comment 1 Daniel Veillard 2014-10-06 04:53:54 UTC
Duplicate of 737403

*** This bug has been marked as a duplicate of bug 737403 ***