Kitware / LookingGlassVTKModule

Other
15 stars 12 forks source link

Compiler warnings due to assignments without parentheses #49

Closed rmlearney closed 1 year ago

rmlearney commented 1 year ago

Building on an M1 Mac, MacOS 12.5, GCC Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.6.0

[1740/10183] Building CXX object Remot...ass.dir/vtkLookingGlassInterface.cxx.o
In file included from /Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:77:
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkCocoaLookingGlassRenderWindow.h:141:8: warning: 'SetDeviceIndex' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
  void SetDeviceIndex(int i);
       ^
/Users/rmlearney/git/VTK/Rendering/Core/vtkRenderWindow.h:705:3: note: overridden virtual function is here
  vtkSetMacro(DeviceIndex, int);
  ^
/Users/rmlearney/git/VTK/Common/Core/vtkSetGet.h:129:16: note: expanded from macro 'vtkSetMacro'
  virtual void Set##name(type _arg)                                                                \
               ^
<scratch space>:6:1: note: expanded from here
SetDeviceIndex
^
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:768:45: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
  for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit);)
                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:768:45: note: place parentheses around the assignment to silence this warning
  for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit);)
                                            ^
                                       (                                      )
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:768:45: note: use '==' to turn this assignment into an equality comparison
  for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit);)
                                            ^
                                            ==
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:795:47: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit); ++count)
                                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:795:47: note: place parentheses around the assignment to silence this warning
    for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit); ++count)
                                              ^
                                         (                                      )
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:795:47: note: use '==' to turn this assignment into an equality comparison
    for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit); ++count)
                                              ^
                                              ==
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:850:45: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
  for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit); ++count)
                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:850:45: note: place parentheses around the assignment to silence this warning
  for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit); ++count)
                                            ^
                                       (                                      )
/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkLookingGlassInterface.cxx:850:45: note: use '==' to turn this assignment into an equality comparison
  for (renderers->InitTraversal(rsit); aren = renderers->GetNextRenderer(rsit); ++count)
                                            ^
                                            ==
4 warnings generated.