ref: 120b9756f620a4204720eefb40e900c938eb2589
parent: 88a580e78a1d52f421efa97850d8d115d3593dfa
author: cancel <cancel@cancel.fm>
date: Tue Jan 28 19:21:12 EST 2020
Fix GCC -Wconversion warning in newer GCC versions Fixes #53
--- a/sim.c
+++ b/sim.c
@@ -62,7 +62,7 @@
// Returns UINT8_MAX if not a valid note.
static U8 midi_note_number_of(Glyph g) {
int sharp = (g & 1 << 5) >> 5; // sharp=1 if lowercase
- g &= ~(1 << 5); // make uppercase
+ g &= (Glyph) ~(1 << 5); // make uppercase
if (g < 'A' || g > 'Z') // A through Z only
return UINT8_MAX;
// We want C=0, D=1, E=2, etc. A and B are equivalent to H and I.