From 831979ead145b12cf66ffdb6eac10d508bfbbf0d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Aug 2020 18:14:57 +0200 Subject: [PATCH] Suppress gcc -Wctor-dtor-privacy in wx/strvararg.h Helper structs declared in this header intentionally define their ctor as private, avoid gcc complaints about it. --- include/wx/strvararg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h index 3a363a3dee..0abf59b1b3 100644 --- a/include/wx/strvararg.h +++ b/include/wx/strvararg.h @@ -31,6 +31,10 @@ class WXDLLIMPEXP_FWD_BASE wxCStrData; class WXDLLIMPEXP_FWD_BASE wxString; +// There are a lot of structs with intentionally private ctors in this file, +// suppress gcc warnings about this. +wxGCC_WARNING_SUPPRESS(ctor-dtor-privacy) + // ---------------------------------------------------------------------------- // WX_DEFINE_VARARG_FUNC* macros // ---------------------------------------------------------------------------- @@ -1248,4 +1252,6 @@ private: inline void name(_WX_VARARG_FIXED_UNUSED_EXPAND(numfixed, fixed)) \ {} +wxGCC_WARNING_RESTORE(ctor-dtor-privacy) + #endif // _WX_STRVARARG_H_