Merge topic 'correct_gcc_7_warnings'
737ea7e1 Suppress maybe-uninitialized warnings for gcc 4+ 7ac4ae15 Marching Cubes test doesn't abuse fall through case statements Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1182
This commit is contained in:
commit
dcbd5b9e81
@ -176,23 +176,29 @@ public:
|
||||
|
||||
switch (localId)
|
||||
{
|
||||
case 2:
|
||||
globalId += 1;
|
||||
case 3:
|
||||
globalId += this->Dimension;
|
||||
case 1:
|
||||
globalId += 1;
|
||||
case 0:
|
||||
break;
|
||||
case 6:
|
||||
globalId += 1;
|
||||
case 7:
|
||||
globalId += this->Dimension;
|
||||
case 5:
|
||||
case 1:
|
||||
globalId += 1;
|
||||
break;
|
||||
case 2:
|
||||
globalId += this->Dimension + 2;
|
||||
break;
|
||||
case 3:
|
||||
globalId += this->Dimension + 1;
|
||||
break;
|
||||
case 4:
|
||||
globalId += this->DimPlus1Squared;
|
||||
break;
|
||||
case 5:
|
||||
globalId += this->DimPlus1Squared + 1;
|
||||
break;
|
||||
case 6:
|
||||
globalId += this->Dimension + this->DimPlus1Squared + 2;
|
||||
break;
|
||||
case 7:
|
||||
globalId += this->Dimension + this->DimPlus1Squared + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return globalId;
|
||||
|
@ -20,22 +20,25 @@
|
||||
#ifndef vtkm_testing_VecTraitsTest_h
|
||||
#define vtkm_testing_VecTraitsTest_h
|
||||
|
||||
//GCC 4+ when running the test code have false positive warnings
|
||||
//about uninitialized vtkm::VecC<> when filled by VecTraits<T>::CopyInto.
|
||||
//The testing code already verifies that CopyInto works by verifying the
|
||||
//results, so we are going to suppress `-Wmaybe-uninitialized` for this
|
||||
//file
|
||||
//This block has to go before we include any vtkm file that brings in
|
||||
//<vtkm/Types.h> otherwise the warning suppression will not work
|
||||
#include <vtkm/internal/Configure.h>
|
||||
#if (defined(VTKM_GCC) && __GNUC__ >= 4)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif // gcc 4+
|
||||
|
||||
#include <vtkm/VecTraits.h>
|
||||
|
||||
#include <vtkm/TypeTraits.h>
|
||||
|
||||
#include <vtkm/testing/Testing.h>
|
||||
|
||||
//GCC 5 and 6 when running the test code have false positive warnings
|
||||
//about uninitialized vtkm::VecC<> when filled by VecTraits<T>::CopyInto.
|
||||
//The testing code already verifies that CopyInto works by verifying the
|
||||
//results, so we are going to suppress `-Wmaybe-uninitialized` for this
|
||||
//file
|
||||
#if (defined(VTKM_GCC) && __GNUC__ > 4 && __GNUC__ < 7)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif // gcc 5 or 6
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace testing
|
||||
|
Loading…
Reference in New Issue
Block a user