Index: config.lib =================================================================== --- config.lib (revision 27708) +++ config.lib (working copy) @@ -1404,6 +1404,9 @@ # warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing] # They are valid according to the C++ standard, but useless. cxxflags="$cxxflags -Wno-narrowing" + fi + + if [ $cc_version -ge 407 ]; then # Disable bogus 'attempt to free a non-heap object' warning flags="$flags -Wno-free-nonheap-object" fi Index: src/saveload/saveload.cpp =================================================================== --- src/saveload/saveload.cpp (revision 27708) +++ src/saveload/saveload.cpp (working copy) @@ -1484,6 +1484,8 @@ return 0; } +#ifdef OTTD_ASSERT + /** * Check whether the variable size of the variable in the saveload configuration * matches with the actual variable size. @@ -1524,9 +1526,13 @@ } } +#endif /* OTTD_ASSERT */ + bool SlObjectMember(void *ptr, const SaveLoad *sld) { +#ifdef OTTD_ASSERT assert(IsVariableSizeRight(sld)); +#endif VarType conv = GB(sld->conv, 0, 8); switch (sld->cmd) {