From 970b7dd63d33ced06c318a99fdad1a7b1cf384bd Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 15:27:32 +0200 Subject: [PATCH] (Windows) Fixed some MinGW compiler warnings. --- es-app/src/VolumeControl.cpp | 6 ++++-- es-app/src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/es-app/src/VolumeControl.cpp b/es-app/src/VolumeControl.cpp index 18fd01b0d..2d865867d 100644 --- a/es-app/src/VolumeControl.cpp +++ b/es-app/src/VolumeControl.cpp @@ -131,9 +131,10 @@ void VolumeControl::init() // Retrieve endpoint volume. defaultDevice->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, nullptr, reinterpret_cast(&endpointVolume)); - if (endpointVolume == nullptr) + if (endpointVolume == nullptr) { LOG(LogError) << "VolumeControl::init(): " "Failed to get default audio endpoint volume!"; + } // Release default device. we don't need it anymore. defaultDevice->Release(); } @@ -245,8 +246,9 @@ void VolumeControl::setVolume(int volume) float floatVolume = 0.0f; // 0-1 if (volume > 0) floatVolume = static_cast(volume) / 100.0f; - if (endpointVolume->SetMasterVolumeLevelScalar(floatVolume, nullptr) != S_OK) + if (endpointVolume->SetMasterVolumeLevelScalar(floatVolume, nullptr) != S_OK) { LOG(LogError) << "VolumeControl::setVolume(): Failed to set master volume"; + } } #endif } diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index db3544b91..86e9bf385 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -132,7 +132,7 @@ bool parseArgs(int argc, char* argv[]) #if defined(_WIN64) // Print any command line output to the console. if (argc > 1) - win64ConsoleType consoleType = outputToConsole(false); + outputToConsole(false); #endif std::string portableFilePath = Utils::FileSystem::getExePath() + "/portable.txt";