7aa8c7e6cd
This commit removes some -Wempty-body, -Wmaybe-uninitialized, -Wunused-variable, and -Wstrict-overflow compiler warnings that arise on my x86-64 and ARM arch linux machines when compiling release. These compiler warnings don't seem to cause any bugs, but since they pollute the build output, they make it harder to spot potentially important warnings that might arise, so I'm making these small changes to keep the build output clean. The "empty-body" warnings occur because the Q_ASSERT statements are removed for release compiles, causing the else blocks to be empty. Surrounding the Q_ASSERT with brackets will let the compiler know we aren't unintentionally having an empty else body. The "maybe-uninitialized" warnings are handled by assigning the variables to 0 either at initialization or in a switch default block. The "unused-variable" warning is due to PeriodItem updatePeriods[] in preferences.cpp being defined but never used, so I've removed PeriodItem. Also a recent commit has an unused "int staves", which I've removed. The "strict-overflow" warning is due to compiler wanting to perform an optimization which would cause signed overflow during a comparison operation. I've made the compiler happy by casting the barIndex'es into unsigned ints, so it doesn't have to worry. |
||
---|---|---|
.. | ||
importmidi.cpp | ||
importmidi_beat.cpp | ||
importmidi_beat.h | ||
importmidi_chord.cpp | ||
importmidi_chord.h | ||
importmidi_chordname.cpp | ||
importmidi_chordname.h | ||
importmidi_clef.cpp | ||
importmidi_clef.h | ||
importmidi_delegate.cpp | ||
importmidi_delegate.h | ||
importmidi_drum.cpp | ||
importmidi_drum.h | ||
importmidi_fraction.cpp | ||
importmidi_fraction.h | ||
importmidi_inner.cpp | ||
importmidi_inner.h | ||
importmidi_instrument.cpp | ||
importmidi_instrument.h | ||
importmidi_key.cpp | ||
importmidi_key.h | ||
importmidi_lrhand.cpp | ||
importmidi_lrhand.h | ||
importmidi_lyrics.cpp | ||
importmidi_lyrics.h | ||
importmidi_meter.cpp | ||
importmidi_meter.h | ||
importmidi_model.cpp | ||
importmidi_model.h | ||
importmidi_operation.h | ||
importmidi_operations.cpp | ||
importmidi_operations.h | ||
importmidi_panel.cpp | ||
importmidi_panel.h | ||
importmidi_panel.ui | ||
importmidi_quant.cpp | ||
importmidi_quant.h | ||
importmidi_simplify.cpp | ||
importmidi_simplify.h | ||
importmidi_swing.cpp | ||
importmidi_swing.h | ||
importmidi_tempo.cpp | ||
importmidi_tempo.h | ||
importmidi_tie.cpp | ||
importmidi_tie.h | ||
importmidi_tuplet.cpp | ||
importmidi_tuplet.h | ||
importmidi_tuplet_detect.cpp | ||
importmidi_tuplet_detect.h | ||
importmidi_tuplet_filter.cpp | ||
importmidi_tuplet_filter.h | ||
importmidi_tuplet_tonotes.cpp | ||
importmidi_tuplet_tonotes.h | ||
importmidi_tuplet_voice.cpp | ||
importmidi_tuplet_voice.h | ||
importmidi_view.cpp | ||
importmidi_view.h | ||
importmidi_voice.cpp | ||
importmidi_voice.h |