PVS-StudioWarnings

PVS-Studio warning V629 for xpdfwin

Nov 27th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. typedef signed long long S64;
  2.  
  3. SFIXED RFXSWF_QFIX(int zaehler, int nenner)
  4. {
  5.   S64 z = zaehler<<16;
  6.   S64 a = z/(S64)nenner;
  7.   return (SFIXED)a;
  8. }
  9.  
  10. This suspicious code was found in xpdfwin project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V629 Consider inspecting the 'zaehler << 16' expression. Bit shifting of the 32-bit value with a subsequent expansion to the 64-bit type. swftools.c 37
  13.  
  14. 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