From a78659ed0529226ad937f5e241ad72ba93702959 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Mon, 28 May 2018 15:39:02 +0200 Subject: Fix more GCC 8.1 warnings   1   master  MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix 3 warnings reported by GCC 8.1 of the following type ```src/client/gameui.cpp:191:43: warning: « void* memset(void*, int, size_t) » effacement d'un objet du type non trivial « struct GameUI::Flags »; use assignment or value-initialization instead [-Wclass-memaccess] memset(&m_flags, 0, sizeof(GameUI::Flags)); ``` --- src/client/gameui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index 142d30922..7e0a7ef67 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -188,7 +188,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ void GameUI::initFlags() { - memset(&m_flags, 0, sizeof(GameUI::Flags)); + m_flags = GameUI::Flags(); m_flags.show_chat = true; m_flags.show_hud = true; m_flags.show_debug = g_settings->getBool("show_debug"); -- cgit v1.2.3