Compiler warning about increased alignment due to cast (UG)

I get

/data/dune-grid/dune/grid/uggrid/uglbgatherscatter.hh:77:35: warning: cast from 'char *' to 'DataType *' (aka 'int *') increases required alignment from 1 to 4 [-Wcast-align]
          DataType *dataPointer = (DataType*)(buffer + paramIdx*sizeof(DataType));
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

a lot and it clutters my output. Does anyone know how to fix this? Doesn't seem like a big thing. Do we need static_cast or reinterpret_cast?

Edited by Timo Koch