Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int32_t getRuleWeekInMonth(void) const;
- typedef struct _SYSTEMTIME {
- ....
- WORD wDay;
- ....
- } SYSTEMTIME, *PSYSTEMTIME;
- static UBool getSystemTimeInformation(....)
- {
- ....
- standardDate.wDay = std->getRule()->getRuleWeekInMonth();
- if (standardDate.wDay < 0) {
- standardDate.wDay = 5;
- }
- ....
- }
- This suspicious code was found in ICU project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'standardDate.wDay < 0' is always false. Unsigned type value is never < 0. wintzimpl.cpp 66
- 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