Skip to content

Commit

Permalink
Fixed Xcode warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 4, 2013
1 parent ce3919e commit c018636
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dynamic_ogg.h
Expand Up @@ -31,7 +31,7 @@ typedef struct {
void *handle;
int (*ov_clear)(OggVorbis_File *vf);
vorbis_info *(*ov_info)(OggVorbis_File *vf,int link);
int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks);
int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks);
ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i);
#ifdef OGG_USE_TREMOR
long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream);
Expand Down
5 changes: 1 addition & 4 deletions load_flac.c
Expand Up @@ -61,10 +61,7 @@ static FLAC__StreamDecoderReadStatus flac_read_load_cb(
*bytes = SDL_RWread (data->sdl_src, buffer, sizeof (FLAC__byte),
*bytes);

if(*bytes < 0) { // error in read
return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
}
else if(*bytes == 0) { // no data was read (EOF)
if (*bytes == 0) { // error or no data was read (EOF)
return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
}
else { // data was read, continue
Expand Down
2 changes: 1 addition & 1 deletion music.c
Expand Up @@ -530,7 +530,7 @@ Mix_Music *Mix_LoadMUS(const char *file)
music->data.cmd = MusicCMD_LoadSong(music_cmd, file);
if ( music->data.cmd == NULL ) {
SDL_free(music);
music == NULL;
music = NULL;
}
return music;
}
Expand Down
5 changes: 1 addition & 4 deletions music_flac.c
Expand Up @@ -62,10 +62,7 @@ static FLAC__StreamDecoderReadStatus flac_read_music_cb(
if (*bytes > 0) {
*bytes = SDL_RWread (data->rwops, buffer, sizeof (FLAC__byte), *bytes);

if (*bytes < 0) { // error in read
return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
}
else if (*bytes == 0 ) { // no data was read (EOF)
if (*bytes == 0 ) { // error or no data was read (EOF)
return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
}
else { // data was read, continue
Expand Down

0 comments on commit c018636

Please sign in to comment.