Advertisement
PVS-StudioWarnings

PVS-Studio warning V547 for VTK

Nov 27th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. int vtkNetCDFCFReader::RequestDataObject(....)
  2. {
  3.   if (    (preferredDataType != VTK_IMAGE_DATA)
  4.        || (preferredDataType != VTK_RECTILINEAR_GRID) )
  5.   {
  6.     vtkWarningMacro("You have set the OutputType to a data "
  7.                     "type that cannot fully represent the "
  8.                     "topology of the data. Some of the "
  9.                     "topology will be ignored.");
  10.   }
  11. }
  12.  
  13. This suspicious code was found in VTK project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V547 Expression is always true. Probably the '&&' operator should be used here. vtkIO vtknetcdfcfreader.cxx 838
  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