From fb796843df34cbba86afcf5fb7d3c97744c5cc74 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 17 Jan 2021 17:54:29 -0500 Subject: [PATCH] configure_service: Only compile FormatEventStatusString when YUZU_ENABLE_BOXCAT is enabled The function is unused if YUZU_ENABLE_BOXCAT is disabled, causing a -Wunused-funciton error when compiled. Wrapping it with `#ifdef YUZU_ENABLE_BOXCAT` to prevent compiling the function when the variable is disabled. Opting to not use [[maybe unused]] in case the function is totally unused in the future. --- src/yuzu/configuration/configure_service.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp index 0de7a4f0b..b580cfff2 100644 --- a/src/yuzu/configuration/configure_service.cpp +++ b/src/yuzu/configuration/configure_service.cpp @@ -9,6 +9,7 @@ #include "ui_configure_service.h" #include "yuzu/configuration/configure_service.h" +#ifdef YUZU_ENABLE_BOXCAT namespace { QString FormatEventStatusString(const Service::BCAT::EventStatus& status) { QString out; @@ -32,6 +33,7 @@ QString FormatEventStatusString(const Service::BCAT::EventStatus& status) { return out; } } // Anonymous namespace +#endif ConfigureService::ConfigureService(QWidget* parent) : QWidget(parent), ui(std::make_unique()) {