Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALWAYS_INLINE int
- FEConvolveMatrix::getPixelValue(
- PaintingData& paintingData, int x, int y)
- {
- if (x >= 0 &&
- x < paintingData.width &&
- x >= 0 &&
- y < paintingData.height)
- return (y * paintingData.width + x) << 2;
- ...
- }
- This is what should have been written here: y >= 0 && y < paintingData.height
- This suspicious code was found in WebKit project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions 'x >= 0' to the left and to the right of the '&&' operator. webcore_platform feconvolvematrix.cpp 289
- 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