OSDN Git Service

inline, defaults to "extern inline" with newer gcc versions
authorStian Skjelstad <stian.skjelstad@gmail.com>
Mon, 21 Mar 2016 00:03:19 +0000 (01:03 +0100)
committerTAMUKI Shoichi <tamuki@linet.gr.jp>
Sun, 1 May 2016 23:19:47 +0000 (08:19 +0900)
With newer versions of gcc, "inline" defaults to extern, and not static if
not specified. This causes linking problems at the end of the compile. Most
of this occurences are fixed (or #ifdef'ed away) except these two small
ones in timidity/mfi.c

Signed-off-by: Stian Skjelstad <stian.skjelstad@gmail.com>
timidity/mfi.c

index 8170cce..44dcc2f 100755 (executable)
@@ -344,7 +344,7 @@ typedef struct LastNoteInfo {
 #define SEND_LASTNOTEINFO(lni, ch)                             if (LASTNOTEINFO_HAS_DATA((lni)[ch])) SendLastNoteInfo(lni, ch);
 #define SEND_AND_CLEAR_LASTNOTEINFO(lni, ch)   if (LASTNOTEINFO_HAS_DATA((lni)[ch])) { SendLastNoteInfo(lni, ch); (lni)[ch].on = NO_LAST_NOTE_INFO; }
 
-inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int duration, int note, int velocity)
+static inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int duration, int note, int velocity)
 {
        info[channel].on = time;
        info[channel].off = time + duration;
@@ -352,7 +352,7 @@ inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int dur
        info[channel].velocity = velocity;
 }
 
-inline void SendLastNoteInfo(const LastNoteInfo *info, int channel)
+static inline void SendLastNoteInfo(const LastNoteInfo *info, int channel)
 {
        NOTE_BUF_EV_DEBUGSTR(channel, info[channel].on, note_name[info[channel].note % 12], info[channel].note / 12, info[channel].velocity, info[channel].off);
        MIDIEVENT(info[channel].on, ME_NOTEON, channel, info[channel].note, info[channel].velocity);