Advertisement
PVS-StudioWarnings

PVS-Studio warning V519 for OpenMW

Nov 21st, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. std::string getUtf8 (unsigned char c,
  2.   ToUTF8::Utf8Encoder& encoder, ToUTF8::FromType encoding)
  3. {
  4.   ....
  5.   conv[0xa2] = 0xf3;
  6.   conv[0xa3] = 0xbf;
  7.   conv[0xa4] = 0x0;
  8.   conv[0xe1] = 0x8c;
  9.   conv[0xe1] = 0x8c;   <<<<====
  10.   conv[0xe3] = 0x0;
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in OpenMW project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V519 The 'conv[0xe1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 103, 104. openmw fontloader.cpp 104
  17.  
  18. 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