Skip to content

Commit

Permalink
BUILD(audiowizard): Fix build with -Dspeechd=OFF -Dwarnings-as-errors=ON
Browse files Browse the repository at this point in the history
Move the declaration/definition of `iMessage` to where it is used,
otherwise the build fails with

```
src/mumble/AudioWizard.cpp:95:10: error: variable 'iMessage' set but not used [-Werror,-Wunused-but-set-variable]
        quint32 iMessage = Settings::LogNone;
                        ^
1 error generated.
```

Build-tested on OpenBSD 7.0-CURRENT using
```
$ cc --version
OpenBSD clang version 13.0.0
Target: amd64-unknown-openbsd7.0
Thread model: posix
InstalledDir: /usr/bin
```
  • Loading branch information
klemensn committed Jan 11, 2022
1 parent 696ec23 commit 0c769d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mumble/AudioWizard.cpp
Expand Up @@ -92,18 +92,18 @@ AudioWizard::AudioWizard(QWidget *p) : QWizard(p) {
else
qrbQualityCustom->setChecked(true);

quint32 iMessage = Settings::LogNone;
for (int i = Log::firstMsgType; i <= Log::lastMsgType; ++i) {
iMessage |= (Global::get().s.qmMessages[i] & (Settings::LogSoundfile | Settings::LogTTS));
}

#ifdef USE_NO_TTS
qrbNotificationCustom->setChecked(false);
qrbNotificationCustom->setDisabled(true);
qrbNotificationTTS->setChecked(false);
qrbNotificationTTS->setDisabled(true);
qrbNotificationSounds->setChecked(true);
#else
quint32 iMessage = Settings::LogNone;
for (int i = Log::firstMsgType; i <= Log::lastMsgType; ++i) {
iMessage |= (Global::get().s.qmMessages[i] & (Settings::LogSoundfile | Settings::LogTTS));
}

if (iMessage == Settings::LogTTS && Global::get().s.bTTS)
qrbNotificationTTS->setChecked(true);
else if (iMessage == Settings::LogSoundfile)
Expand Down

0 comments on commit 0c769d8

Please sign in to comment.