Fixed bug #808
authorSam Lantinga
Sat, 26 Sep 2009 10:51:23 +0000
changeset 400bc35cb13c14b
parent 399 a5181f588b96
child 401 ee71829d80e7
Fixed bug #808

O.Sezer 2009-09-26 03:48:05 PDT

native_midi_error() returns strings at many places but is declared to return
char* instead of co√ľnst char*. The attached patch makes native_midi_error() to
return const char*.
native_midi/native_midi.h
native_midi/native_midi_mac.c
native_midi/native_midi_win32.c
native_midi_gpl/native_midi_gpl.c
     1.1 --- a/native_midi/native_midi.h	Sat Sep 26 10:49:30 2009 +0000
     1.2 +++ b/native_midi/native_midi.h	Sat Sep 26 10:51:23 2009 +0000
     1.3 @@ -35,6 +35,6 @@
     1.4  void native_midi_stop();
     1.5  int native_midi_active();
     1.6  void native_midi_setvolume(int volume);
     1.7 -char *native_midi_error();
     1.8 +const char *native_midi_error(void);
     1.9  
    1.10  #endif /* _NATIVE_MIDI_H_ */
     2.1 --- a/native_midi/native_midi_mac.c	Sat Sep 26 10:49:30 2009 +0000
     2.2 +++ b/native_midi/native_midi_mac.c	Sat Sep 26 10:51:23 2009 +0000
     2.3 @@ -339,7 +339,7 @@
     2.4  	TuneSetVolume(gTunePlayer, (0x00010000 * volume)/SDL_MIX_MAXVOLUME);
     2.5  }
     2.6  
     2.7 -char *native_midi_error()
     2.8 +const char *native_midi_error(void)
     2.9  {
    2.10  	return gErrorBuffer;
    2.11  }
     3.1 --- a/native_midi/native_midi_win32.c	Sat Sep 26 10:49:30 2009 +0000
     3.2 +++ b/native_midi/native_midi_win32.c	Sat Sep 26 10:51:23 2009 +0000
     3.3 @@ -311,7 +311,7 @@
     3.4    midiOutSetVolume((HMIDIOUT)hMidiStream, MAKELONG(calcVolume , calcVolume));
     3.5  }
     3.6  
     3.7 -char *native_midi_error()
     3.8 +const char *native_midi_error(void)
     3.9  {
    3.10    return "";
    3.11  }
     4.1 --- a/native_midi_gpl/native_midi_gpl.c	Sat Sep 26 10:49:30 2009 +0000
     4.2 +++ b/native_midi_gpl/native_midi_gpl.c	Sat Sep 26 10:51:23 2009 +0000
     4.3 @@ -315,7 +315,7 @@
     4.4  {
     4.5  }
     4.6  
     4.7 -char *native_midi_error()
     4.8 +const char *native_midi_error(void)
     4.9  {
    4.10    return "stala sa chyba";
    4.11  }