Skip to content

Remove gcc warning about static declared function

While compiling UnitTestVariantArrayHandle, some versions of gcc (between 6 and 8, I think) gave a warning like the following:

../vtkm/cont/StorageVirtual.h:227:12: warning: 'vtkm::Id vtkm::cont::internal::detail::StorageVirtualImpl<T, S>::GetNumberOfValues() const [with T = std::__cxx11::basic_string<char>; S = vtkm::cont::StorageTagImplicit<{anonymous}::UnusualPortal<std::__cxx11::basic_string<char> > >]' declared 'static' but never defined [-Wunused-function]

This warning makes no sense because it is refering to a method that is not declared static. (In fact, it overrides a virtual method.)

I believe this is an obscure bug in these versions of gcc. I found a stackoverflow post that seems to have the same problem, but no workaround was found.

The warning originated from code that had little effect. It was part of a test with a custom ArrayHandle storage type that was already disabled for other reasons. Just removed the code.

Merge request reports