avoid signedness warnings

on platforms where char is unsigned
This commit is contained in:
derselbst 2017-11-25 12:29:07 +01:00
parent a7fe5c4257
commit 4178bbdb72

View file

@ -225,7 +225,7 @@ int fluid_midi_file_eof(fluid_midi_file* mf)
int
fluid_midi_file_read_mthd(fluid_midi_file *mf)
{
signed char mthd[14];
char mthd[14];
if (fluid_midi_file_read(mf, mthd, sizeof(mthd)) != FLUID_OK) {
return FLUID_FAILED;
}
@ -238,9 +238,9 @@ fluid_midi_file_read_mthd(fluid_midi_file *mf)
mf->type = mthd[9];
mf->ntracks = (unsigned) mthd[11];
mf->ntracks += (unsigned int) (mthd[10]) << 16;
if ((mthd[12]) < 0) {
if ((signed char)mthd[12] < 0) {
mf->uses_smpte = 1;
mf->smpte_fps = -mthd[12];
mf->smpte_fps = -(signed char)mthd[12];
mf->smpte_res = (unsigned) mthd[13];
FLUID_LOG(FLUID_ERR, "File uses SMPTE timing -- Not implemented yet");
return FLUID_FAILED;