Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QString decodeMSG(const MSG& msg)
- {
- ...
- int repCount = (lKeyData & 0xffff); // Bit 0-15
- int scanCode = (lKeyData & 0xf0000) >> 16; // Bit 16-23
- bool contextCode = (lKeyData && 0x20000000); // Bit 29
- bool prevState = (lKeyData && 0x40000000); // Bit 30
- bool transState = (lKeyData && 0x80000000); // Bit 31
- ...
- }
- This place is not crucial, but still needs paying attention to.
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V560 A part of conditional expression is always true: 0x20000000. QtCore qcoreapplication_win.cpp 870
- 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