Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace EOnlineSharingReadCategory
- {
- enum Type
- {
- None = 0x00,
- Posts = 0x01,
- Friends = 0x02,
- Mailbox = 0x04,
- OnlineStatus = 0x08,
- ProfileInfo = 0x10,
- LocationInfo = 0x20,
- Default = ProfileInfo|LocationInfo,
- };
- }
- namespace EOnlineSharingPublishingCategory
- {
- enum Type {
- None = 0x00,
- Posts = 0x01,
- Friends = 0x02,
- AccountAdmin = 0x04,
- Events = 0x08,
- Default = None,
- };
- inline const TCHAR* ToString(
- EOnlineSharingReadCategory::Type CategoryType)
- {
- switch (CategoryType)
- {
- case None:
- {
- return TEXT("Category undefined");
- }
- case Posts:
- {
- return TEXT("Posts");
- }
- case Friends:
- {
- return TEXT("Friends");
- }
- case AccountAdmin:
- {
- return TEXT("Account Admin");
- }
- ....
- }
- }
- This suspicious code was found in UnrealEngine4 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: ... }. onlinesubsystemtypes.h 1154
- 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