Advertisement
PVS-StudioWarnings

PVS-Studio warning V524 for blender

Nov 10th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. float uiLayoutGetScaleX(uiLayout *layout)
  2. {
  3.   return layout->scale[0];
  4. }
  5.  
  6. float uiLayoutGetScaleY(uiLayout *layout)
  7. {
  8.   return layout->scale[0];
  9. }
  10.  
  11. Most likely this is what should be written in uiLayoutGetScaleY(): layout->scale[1];
  12.  
  13. This suspicious code was found in blender project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V524 It is odd that the body of 'uiLayoutGetScaleY' function is fully equivalent to the body of 'uiLayoutGetScaleX' function (interface_layout.c, line 2410). bf_editor_interface interface_layout.c 2415
  16.  
  17. 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