From 5bc7ffd8c710645eb02e42bf2b4f4367bb46135e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Dec 2022 23:21:19 +0100 Subject: [PATCH] Suppress -Wnonnull warning in the except sample We really want to crash here, so disable the helpful warning that tries to prevent us from doing it. --- samples/except/except.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/except/except.cpp b/samples/except/except.cpp index 9fea370af6..ce322a1101 100644 --- a/samples/except/except.cpp +++ b/samples/except/except.cpp @@ -61,8 +61,12 @@ static void DoCrash() { + wxGCC_WARNING_SUPPRESS(nonnull) + char *p = 0; strcpy(p, "Let's crash"); + + wxGCC_WARNING_RESTORE(nonnull) } // ----------------------------------------------------------------------------