Advertisement
PVS-StudioWarnings

PVS-Studio warning V610 for blender

Nov 27th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #define cpack(x) glColor3ub( ((x)&0xFF), (((x)>>8)&0xFF), \
  2. (((x)>>16)&0xFF) )
  3.  
  4. static void star_stuff_init_func(void)
  5. {
  6.   cpack(-1);
  7.   glPointSize(1.0);
  8.   glBegin(GL_POINTS);
  9. }
  10.  
  11. This suspicious code was found in blender project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V610 Unspecified behavior. Check the shift operator '>>. The left operand '(- 1)' is negative. bf_editor_space_view3d view3d_draw.c 101
  14.  
  15. 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