From 2ab092740719e7420901ae5b20af748db2ef4b22 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 10 Jan 2017 06:27:09 +0000 Subject: [PATCH] GUI: Suppress Unused Variable Warning For Some Build Configurations. This fix is not totally clean as it spuriously uses the serverLabelPosition variable in one case of the preprocessor ifdef configuration, but with the current structure, this is a simple hack to fix. A better solution would be to rewrite some of these functions to remove some of the preprocessor usage if possible. --- gui/options.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/options.cpp b/gui/options.cpp index 3f6fc5aa2cb..371a949c35c 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -2120,8 +2120,10 @@ void GlobalOptionsDialog::setupCloudTab() { #else // USE_SDL_NET if (_runServerButton) _runServerButton->setVisible(false); - if (_serverInfoLabel) + if (_serverInfoLabel) { + _serverInfoLabel->setPos(_serverInfoLabel->getRelX(), serverLabelPosition); // Prevent compiler warning from serverLabelPosition being unused. _serverInfoLabel->setVisible(false); + } if (_rootPathButton) _rootPathButton->setVisible(false); if (_rootPath)