Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static enum {
- ABORT, VERBATIM, WARN, WARN_STRIP, STRIP
- } signed_tag_mode = ABORT;
- static enum {
- ERROR, DROP, REWRITE
- } tag_of_filtered_mode = ERROR;
- static void handle_tag(const char *name, struct tag *tag)
- {
- ....
- switch(tag_of_filtered_mode) {
- case ABORT:
- ....
- }
- This suspicious code was found in TortoiseGIT project by PVS-Studio static code analyzer.
- Warning message is:
- V556 The values of different enum types are compared: switch(ENUM_TYPE_A) { case ENUM_TYPE_B: ... }. fast-export.c 449
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement