Advertisement
PVS-StudioWarnings

PVS-Studio warning V536 for eLynxSDK

Nov 25th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. inline
  2. void elxLuminocity(const PixelRGBus& iPixel,
  3.                    LuminanceCell< PixelRGBus >& oCell)
  4. {
  5.   oCell._luminance = uint16(0.2220f*iPixel._red +
  6.                             0.7067f*iPixel._blue +
  7.                             0.0713f*iPixel._green);
  8.   oCell._pixel = iPixel;
  9. }
  10.  
  11. inline
  12. void elxLuminocity(const PixelRGBi& iPixel,
  13.                    LuminanceCell< PixelRGBi >& oCell)
  14. {
  15.   oCell._luminance = 2220*iPixel._red +
  16.                      7067*iPixel._blue +
  17.                      0713*iPixel._green;   <<<---
  18.   oCell._pixel = iPixel;
  19. }
  20.  
  21. This suspicious code was found in eLynxSDK project by PVS-Studio static code analyzer.
  22. Warning message is:
  23. V536 Be advised that the utilized constant value is represented by an octal form. Oct: 0713, Dec: 459. IFF plugins pixelservices.inl 146
  24.  
  25. 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