Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 7, 2014
1 parent fdbe09d commit e799a98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
15 changes: 8 additions & 7 deletions load_ogg.c
Expand Up @@ -43,24 +43,25 @@ static size_t sdl_read_func(void *ptr, size_t size, size_t nmemb, void *datasour
return SDL_RWread((SDL_RWops*)datasource, ptr, size, nmemb);
}

static Sint64 sdl_seek_func(void *datasource, ogg_int64_t offset, int whence)
static int sdl_seek_func(void *datasource, ogg_int64_t offset, int whence)
{
return SDL_RWseek((SDL_RWops*)datasource, offset, whence);
return (int)SDL_RWseek((SDL_RWops*)datasource, offset, whence);
}

static Sint64 sdl_close_func_freesrc(void *datasource)
static int sdl_close_func_freesrc(void *datasource)
{
return SDL_RWclose((SDL_RWops*)datasource);
}

static Sint64 sdl_close_func_nofreesrc(void *datasource)
static int sdl_close_func_nofreesrc(void *datasource)
{
return SDL_RWseek((SDL_RWops*)datasource, 0, RW_SEEK_SET);
SDL_RWseek((SDL_RWops*)datasource, 0, RW_SEEK_SET);
return 0;
}

static Sint64 sdl_tell_func(void *datasource)
static long sdl_tell_func(void *datasource)
{
return SDL_RWtell((SDL_RWops*)datasource);
return (long)SDL_RWtell((SDL_RWops*)datasource);
}


Expand Down
8 changes: 4 additions & 4 deletions music_ogg.c
Expand Up @@ -56,14 +56,14 @@ static size_t sdl_read_func(void *ptr, size_t size, size_t nmemb, void *datasour
return SDL_RWread((SDL_RWops*)datasource, ptr, size, nmemb);
}

static Sint64 sdl_seek_func(void *datasource, ogg_int64_t offset, int whence)
static int sdl_seek_func(void *datasource, ogg_int64_t offset, int whence)
{
return SDL_RWseek((SDL_RWops*)datasource, offset, whence);
return (int)SDL_RWseek((SDL_RWops*)datasource, offset, whence);
}

static Sint64 sdl_tell_func(void *datasource)
static long sdl_tell_func(void *datasource)
{
return SDL_RWtell((SDL_RWops*)datasource);
return (long)SDL_RWtell((SDL_RWops*)datasource);
}

/* Load an OGG stream from an SDL_RWops object */
Expand Down

0 comments on commit e799a98

Please sign in to comment.