Skip to content

Commit

Permalink
ignore "maybe uninitialized" warning in game lua kernel.
Browse files Browse the repository at this point in the history
This breaks compilation for gcc 4.9.2 with -O2, with an apparently
spurious warning.
  • Loading branch information
cbeck88 committed Apr 7, 2015
1 parent 5e978c4 commit 29c99fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scripting/game_lua_kernel.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 29c99fe

Please sign in to comment.