Advertisement
PVS-StudioWarnings

PVS-Studio warning V530 for UnrealEngine4

Nov 20th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. D3D11_STATE_CACHE_INLINE void GetBlendState(
  2.   ID3D11BlendState** BlendState, float BlendFactor[4],
  3.   uint32* SampleMask)
  4. {
  5.   ....
  6.   FMemory::Memcmp(BlendFactor, CurrentBlendFactor,
  7.                   sizeof(CurrentBlendFactor));
  8.   ....
  9. }
  10.  
  11. This is what should have been written here: FMemory::Memcpy
  12.  
  13. This suspicious code was found in UnrealEngine4 project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V530 The return value of function 'Memcmp' is required to be utilized. d3d11statecacheprivate.h 547
  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