Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const CCircularBufferTimeline *
- CCircularBufferStatsContainer::GetTimeline(
- size_t inTimelineId) const
- {
- ....
- if (inTimelineId >= 0 && (int)inTimelineId < m_numTimelines)
- {
- tl = &m_timelines[inTimelineId];
- }
- else
- {
- CryWarning(VALIDATOR_MODULE_GAME,VALIDATOR_ERROR,
- "Statistics event %" PRISIZE_T
- " is larger than the max registered of %"
- PRISIZE_T ", event ignored",
- inTimelineId,m_numTimelines);
- }
- ....
- }
- This suspicious code was found in CryEngineSDK project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'inTimelineId >= 0' is always true. Unsigned type value is always >= 0. circularstatsstorage.cpp 31
- 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