Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 18, 2017
1 parent db8ede7 commit 0a99464
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion music.h
Expand Up @@ -105,7 +105,7 @@ typedef struct

extern int load_music(void);
extern Mix_MusicType detect_music_type_from_magic(const Uint8 *magic);
extern int get_num_music_interfaces();
extern int get_num_music_interfaces(void);
extern Mix_MusicInterface *get_music_interface(int index);
extern SDL_bool has_music(Mix_MusicType type);
extern int open_music(const SDL_AudioSpec *spec);
Expand Down
4 changes: 2 additions & 2 deletions music_flac.c
Expand Up @@ -34,7 +34,7 @@
typedef struct {
int loaded;
void *handle;
FLAC__StreamDecoder *(*FLAC__stream_decoder_new)();
FLAC__StreamDecoder *(*FLAC__stream_decoder_new)(void);
void (*FLAC__stream_decoder_delete)(FLAC__StreamDecoder *decoder);
FLAC__StreamDecoderInitStatus (*FLAC__stream_decoder_init_stream)(
FLAC__StreamDecoder *decoder,
Expand Down Expand Up @@ -76,7 +76,7 @@ static int FLAC_Load(void)
return -1;
}
flac.FLAC__stream_decoder_new =
(FLAC__StreamDecoder *(*)())
(FLAC__StreamDecoder *(*)(void))
SDL_LoadFunction(flac.handle, "FLAC__stream_decoder_new");
if (flac.FLAC__stream_decoder_new == NULL) {
SDL_UnloadObject(flac.handle);
Expand Down
10 changes: 5 additions & 5 deletions music_mpg123.c
Expand Up @@ -350,7 +350,7 @@ static int update_format(mpg_data* m)

SDL_BuildAudioCVT(
&m->cvt,
sdlfmt, channels, rate,
sdlfmt, channels, (int)rate,
m->mixer.format,
m->mixer.channels,
m->mixer.freq
Expand Down Expand Up @@ -410,13 +410,13 @@ static int getsome(mpg_data* m)

if (cvt->needed) {
/* we need to convert the audio to SDL's format */
cvt->len = len;
cvt->len = (int)len;
SDL_ConvertAudio(cvt);
}

else {
/* no conversion needed, just copy */
cvt->len_cvt = len;
cvt->len_cvt = (int)len;
}

m->len_available = cvt->len_cvt;
Expand Down Expand Up @@ -445,7 +445,7 @@ static int MPG123_GetAudio(void *context, void *data, int bytes)
mixable = len;

if (mixable > m->len_available) {
mixable = m->len_available;
mixable = (int)m->len_available;
}

if (m->volume == MIX_MAX_VOLUME) {
Expand Down Expand Up @@ -478,7 +478,7 @@ static int MPG123_Seek(void *context, double secs)
off_t offset = m->mixer.freq * secs;

if ((offset = mpg123.mpg123_seek(m->handle, offset, SEEK_SET)) < 0) {
return Mix_SetError("mpg123_seek: %s", mpg_err(m->handle, -offset));
return Mix_SetError("mpg123_seek: %s", mpg_err(m->handle, (int)-offset));
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion timidity/common.c
Expand Up @@ -46,7 +46,7 @@ SDL_RWops *open_file(const char *name)
{
char current_filename[1024];
PathList *plp = pathlist;
int l;
size_t l;

while (plp) /* Try along the path then */
{
Expand Down

0 comments on commit 0a99464

Please sign in to comment.