Skip to content

Commit ee9f194

Browse files
committed
Fix more warnings
1 parent 1522d18 commit ee9f194

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

src/audio_midi.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ std::unique_ptr<AudioDecoderBase> MidiDecoder::CreateFluidsynth(bool resample) {
8484
if (mididec && resample) {
8585
mididec = std::make_unique<AudioResampler>(std::move(mididec));
8686
}
87+
#else
88+
(void)resample;
8789
#endif
8890

8991
return mididec;
@@ -107,6 +109,8 @@ std::unique_ptr<AudioDecoderBase> MidiDecoder::CreateWildMidi(bool resample) {
107109
if (mididec && resample) {
108110
mididec = std::make_unique<AudioResampler>(std::move(mididec));
109111
}
112+
#else
113+
(void)resample;
110114
#endif
111115

112116
return mididec;
@@ -126,6 +130,8 @@ std::unique_ptr<AudioDecoderBase> MidiDecoder::CreateFmMidi(bool resample) {
126130
if (mididec && resample) {
127131
mididec = std::make_unique<AudioResampler>(std::move(mididec));
128132
}
133+
#else
134+
(void)resample;
129135
#endif
130136

131137
return mididec;
@@ -152,6 +158,8 @@ void MidiDecoder::ChangeFluidsynthSoundfont(StringView sf_path) {
152158
// Was initialized before
153159
works.fluidsynth = FluidSynthDecoder::ChangeGlobalSoundfont(sf_path, works.fluidsynth_status);
154160
Output::Debug("Fluidsynth: {}", works.fluidsynth_status);
161+
#else
162+
(void)sf_path;
155163
#endif
156164
}
157165

src/game_battlealgorithm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ Game_BattleAlgorithm::AlgorithmBase::AlgorithmBase(Type ty, Game_Battler* source
6262
type(ty), source(source), targets(std::move(in_targets))
6363
{
6464
assert(source != nullptr);
65+
66+
#ifndef NDEBUG
6567
for (auto* t: targets) {
6668
assert(t != nullptr);
6769
}
70+
#endif
6871

6972
Reset();
7073

src/platform/sdl/sdl2_ui.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,7 @@ bool Sdl2Ui::OpenURL(StringView url) {
13281328

13291329
return true;
13301330
#else
1331+
(void)url;
13311332
Output::Warning("Cannot Open URL: SDL2 version too old (must be 2.0.14)");
13321333
return false;
13331334
#endif

src/scene_battle_rpg2k3.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,8 +1739,7 @@ Scene_Battle_Rpg2k3::SceneActionReturn Scene_Battle_Rpg2k3::ProcessSceneActionBa
17391739
return SceneActionReturn::eWaitTillNextFrame;
17401740
}
17411741

1742-
auto* battler = pending_battle_action->GetSource();
1743-
assert(battler != active_actor);
1742+
assert(pending_battle_action->GetSource() != active_actor);
17441743

17451744
pending_battle_action = {};
17461745
RemoveCurrentAction();

0 commit comments

Comments
 (0)