PVS-StudioWarnings

PVS-Studio warning V593 for LibRaw

Nov 13th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. int main(int argc, char *argv[])
  2. {
  3.   int ret;
  4.   ....
  5.   if( (ret = RawProcessor.open_buffer(iobuffer,st.st_size)
  6.              != LIBRAW_SUCCESS))
  7.   {
  8.     fprintf(stderr,"Cannot open_buffer %s: %s\n",
  9.       argv[arg],libraw_strerror(ret));
  10.     free(iobuffer);
  11.     continue;
  12.   }
  13.   ....
  14. }
  15.  
  16. This suspicious code was found in LibRaw project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V593 Consider reviewing the expression of the 'A = B != C' kind. The expression is calculated as following: 'A = (B != C)'. dcraw_emu.cpp 468
  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