Fix compiler warnings

This commit is contained in:
Kenneth Moreland 2020-08-20 16:07:09 -06:00
parent 147dd24d01
commit 7573d4ed57
2 changed files with 7 additions and 1 deletions

@ -93,6 +93,9 @@ VTKM_EXEC_CONT inline std::memory_order StdAtomicMemOrder(vtkm::MemoryOrder orde
case vtkm::MemoryOrder::SequentiallyConsistent:
return std::memory_order_seq_cst;
}
// Should never reach here, but avoid compiler warnings
return std::memory_order_seq_cst;
}
} // namespace internal
@ -520,6 +523,9 @@ VTKM_EXEC_CONT inline int GccAtomicMemOrder(vtkm::MemoryOrder order)
case vtkm::MemoryOrder::SequentiallyConsistent:
return __ATOMIC_SEQ_CST;
}
// Should never reach here, but avoid compiler warnings
return __ATOMIC_SEQ_CST;
}
template <typename T>

@ -155,7 +155,7 @@ struct AtomicTests
{
vtkm::Id arrayIndex = index % ARRAY_SIZE;
vtkm::Id offsetIndex = index / ARRAY_SIZE;
vtkm::AtomicAnd(data + arrayIndex, ~(0x1u << offsetIndex));
vtkm::AtomicAnd(data + arrayIndex, ~(T(0x1u) << offsetIndex));
}
};