svkaiser / Doom64EX

Doom64EX is a reverse-engineering project aimed to recreate Doom64 as close as possible with additional modding features.
http://doom64ex.wordpress.com/
GNU General Public License v2.0
237 stars 49 forks source link

Default CMake configuration cannot build in Arch Linux using included fluidsynth #91

Open MiltosKoutsokeras opened 5 years ago

MiltosKoutsokeras commented 5 years ago

The compilation fails in Arch Linux when the default CMake RelWithDebInfo configuration is used, with ENABLE_SYSTEM_FLUIDSYNTH=OFF. This build command fails:

cmake svkaiser/Doom64EX && make

with a warning considered as error (-Werror=stringop-truncation) about string operation truncation on included fluidsynth library:

`svkaiser/Doom64EX/fluidsynth/src/utils/fluidsynth_priv.h:209:38: error: ‘strncpy’ output may be truncated copying 16 bytes from a string of length 16 [-Werror=stringop-truncation]

define FLUID_STRNCPY(_dst,_src,_n) strncpy(_dst,_src,_n)

                                  ^~~~~~~~~~~~~~~~~~~~~

svkaiser/Doom64EX/fluidsynth/src/synth/fluid_synth.c:1339:9: note: in expansion of macro ‘FLUID_STRNCPY’ FLUID_STRNCPY (resptr, name, 16); ^~~~~ cc1: all warnings being treated as errors`

This error can be worked around by: