From 574318c052752a789461fe463d904a889e59ef8c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 31 Jul 2018 13:38:33 +0100 Subject: MOHAWK: Fix Unused Variable Compiler Warning. This occurs when FreeType2 is not enabled and thus fontHeight variable is unused. --- engines/mohawk/riven_stacks/aspit.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp index 59cc3b9912..6f22786777 100644 --- a/engines/mohawk/riven_stacks/aspit.cpp +++ b/engines/mohawk/riven_stacks/aspit.cpp @@ -98,17 +98,21 @@ void ASpit::xastartupbtnhide(const ArgumentArray &args) { const char *fontname; const Graphics::Font *font = nullptr; - int fontHeight; if (_vm->getLanguage() != Common::JA_JPN) { fontname = "FreeSans.ttf"; - fontHeight = 12; } else { fontname = "mplus-2c-regular.ttf"; - fontHeight = 11; } - #if defined(USE_FREETYPE2) + int fontHeight; + + if (_vm->getLanguage() != Common::JA_JPN) { + fontHeight = 12; + } else { + fontHeight = 11; + } + if (file.open(fontname)) { font = Graphics::loadTTFFont(file, fontHeight); } -- cgit v1.2.3