From fa41d06ccef75666ba3dc59a3ce043f83b2343fc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Feb 2018 18:21:36 +0100 Subject: [PATCH] Fix some harmless gcc 7 -Wimplicit-fallthrough warnings Add wxFALLTHROUGH to avoid the warnings where fall-through is actually desired. --- include/wx/private/wxprintf.h | 1 + src/common/list.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/wx/private/wxprintf.h b/include/wx/private/wxprintf.h index f34d68495e..5854d894d7 100644 --- a/include/wx/private/wxprintf.h +++ b/include/wx/private/wxprintf.h @@ -302,6 +302,7 @@ bool wxPrintfConvSpec::Parse(const CharType *format) break; } // else: fall-through, 'I' is MSVC equivalent of C99 'z' + wxFALLTHROUGH; #endif // __WINDOWS__ case wxT('z'): diff --git a/src/common/list.cpp b/src/common/list.cpp index efaf12a195..decaf8bb36 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -51,6 +51,7 @@ bool wxListKey::operator==(wxListKeyValue value) const wxFAIL_MSG(wxT("bad key type.")); // let compiler optimize the line above away in release build // by not putting return here... + wxFALLTHROUGH; case wxKEY_STRING: return *m_key.string == *value.string;