I fixed all warnings "-Wunused-but-set-variable" by gcc.
I added the attribute "DUNE_UNUSED" to the variables to avoid the warnings.