ignore "maybe uninitialized" warning in game lua kernel.

This breaks compilation for gcc 4.9.2 with -O2, with an apparently
spurious warning.
This commit is contained in:
Chris Beck 2015-04-06 20:46:56 -04:00
parent 5e978c42fc
commit 29c99fe870

View file

@ -128,6 +128,11 @@ class CVideo;
#include "scripting/debug_lua.hpp"
#endif
// Suppress uninitialized variables warnings, because of boost::optional constructors in this file which apparently confuses gcc
#if defined(__GNUC__) && !defined(__clang__) // we shouldn't need this for clang, but for gcc and tdm-gcc we probably do
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
static lg::log_domain log_scripting_lua("scripting/lua");
#define LOG_LUA LOG_STREAM(info, log_scripting_lua)
#define WRN_LUA LOG_STREAM(warn, log_scripting_lua)