Advertisement
PVS-StudioWarnings

PVS-Studio warning V579 for Dolphin

Nov 26th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. void drawShadedTexSubQuad(...,
  2.   const MathUtil::Rectangle<float>* rDest, ...)
  3. {
  4.   ...
  5.   if (stsq_observer ||
  6.       memcmp(rDest, &tex_sub_quad_data.rdest,
  7.              sizeof(rDest)) != 0 ||
  8.       tex_sub_quad_data.u1 != u1 ||
  9.       tex_sub_quad_data.v1 != v1 ||
  10.       tex_sub_quad_data.u2 != u2 ||
  11.       tex_sub_quad_data.v2 != v2 ||
  12.       tex_sub_quad_data.G != G)
  13.   ...
  14. }
  15.  
  16. This suspicious code was found in Dolphin project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V579 The memcmp function receives the pointer and its size as arguments. It is possibly a mistake. Inspect the third argument. VideoDX11 d3dutil.cpp 598
  19.  
  20. 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