From 3fc15101beda8dcf336f645a82482fb116d27fa0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 6 Jul 2020 12:40:03 +0200 Subject: [PATCH] Fix unhelpful unused parameter warning in wxX11 wxFontEnumerator This warning can't really be avoided in this case, unless we decided not to return any fonts at all if we can't test whether they're monospaced or not, but this would probably be even less useful. --- src/unix/fontenum.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp index 01d4a61a75..f28eca94df 100644 --- a/src/unix/fontenum.cpp +++ b/src/unix/fontenum.cpp @@ -62,6 +62,10 @@ wxCompareFamilies (const void *a, const void *b) bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool fixedWidthOnly) { + // This parameter may be unused when pango_font_family_is_monospace() is + // not available, suppress the (unavoidable) warning in this case. + wxUnusedVar(fixedWidthOnly); + if ( encoding != wxFONTENCODING_SYSTEM && encoding != wxFONTENCODING_UTF8 ) { // Pango supports only UTF-8 encoding (and system means any, so we