Skip to content

Suppress signedness warning in BlockExclusion.h

Stephan Seitz requested to merge seitz/walberla:signedness-blockexclusion into master

We can save some casts and suppress a warning by just using uint_t everywhere in this function.

Before everything was int but apparently using OpenMP casted it to uint (on clang++-12).

../src/mesh/blockforest/BlockExclusion.h:103:36: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-c
onversion]
      for( int i = chunkBegin; i < chunkEnd; ++i )
      ~~~                          ^~~~~~~~
../src/mesh/blockforest/BlockExclusion.h:103:20: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-c
onversion]
      for( int i = chunkBegin; i < chunkEnd; ++i )
      ~~~          ^~~~~~~~~~
../src/mesh/blockforest/BlockExclusion.h:103:20: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-c
onversion]
      for( int i = chunkBegin; i < chunkEnd; ++i )
      ~~~          ^~~~~~~~~~
../src/mesh/blockforest/BlockExclusion.h:103:36: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-c
onversion]
      for( int i = chunkBegin; i < chunkEnd; ++i )
      ~~~                          ^~~~~~~~

when I remove the OpenMP stuff the warning disappears also for everything int.

I don't whether this is worth to be fixed. Alternatively, everything could be just size_t.

Edited by Stephan Seitz

Merge request reports