Path: blob/main/games/abuse_sdl/files/patch-src-sdlport-hmi.cpp
16461 views
hmi.cpp:302:97: error: non-constant-expression cannot be narrowed from type 'int' to 'uint8_t'1(aka 'unsigned char') in initializer list [-Wc++11-narrowing]2...0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, (num_tracks + 1), 0x00, 0xC0 };3^~~~~~~~~~~~~~~~4hmi.cpp:302:97: note: insert an explicit cast to silence this issue5...0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, (num_tracks + 1), 0x00, 0xC0 };6^~~~~~~~~~~~~~~~7static_cast<uint8_t>( )89--- src/sdlport/hmi.cpp.orig 2011-05-09 07:58:30 UTC10+++ src/sdlport/hmi.cpp11@@ -299,7 +299,7 @@ uint8_t* load_hmi(char const *filename, uint32_t &data12uint8_t num_tracks = (next_offset - offset_tracks) / sizeof(uint32_t);1314// Write Midi file header15- uint8_t midi_header[] = { 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, (num_tracks + 1), 0x00, 0xC0 };16+ uint8_t midi_header[] = { 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, (uint8_t)(num_tracks + 1), 0x00, 0xC0 };17memcpy(output_buffer_ptr, midi_header, 14);18output_buffer_ptr += 14;19202122