diff --git a/src/i_sndfile.c b/src/i_sndfile.c index 1f4a3207..9b4158ee 100644 --- a/src/i_sndfile.c +++ b/src/i_sndfile.c @@ -395,7 +395,7 @@ static boolean OpenFile(sndfile_t *file, void *data, sf_count_t size) if (!file->sndfile) { - I_Printf(VB_WARNING, "SndFile: %s", sf_strerror(file->sndfile)); + I_Printf(VB_DEBUG, "SndFile: %s", sf_strerror(file->sndfile)); return false; } @@ -439,9 +439,6 @@ static boolean OpenFile(sndfile_t *file, void *data, sf_count_t size) // libsndfile do the conversion. sample_format = Int16; break; - default: - I_Printf(VB_DEBUG, "SndFile: Unknown sfinfo.format %d", (int)file->sfinfo.format); - break; } frame_size = 1; diff --git a/src/i_timer.c b/src/i_timer.c index 7ebc247c..730c3250 100644 --- a/src/i_timer.c +++ b/src/i_timer.c @@ -125,14 +125,11 @@ void I_InitTimer(void) { if (SDL_Init(SDL_INIT_TIMER) < 0) { - I_Error("I_InitTimer: Failed to initialize timer: %s", - SDL_GetError()); - } - else - { - I_AtExit(I_ShutdownTimer, true); + I_Error("I_InitTimer: Failed to initialize timer: %s", SDL_GetError()); } + I_AtExit(I_ShutdownTimer, true); + basefreq = SDL_GetPerformanceFrequency(); I_GetTime = I_GetTime_Scaled; diff --git a/src/net_sdl.c b/src/net_sdl.c index 16f8fa8f..77246771 100644 --- a/src/net_sdl.c +++ b/src/net_sdl.c @@ -156,7 +156,6 @@ static void NET_SDL_FreeAddress(net_addr_t *addr) static boolean NET_SDL_InitClient(void) { int p; - int ret; if (initted) return true; @@ -173,10 +172,13 @@ static boolean NET_SDL_InitClient(void) if (p > 0) port = M_ParmArgToInt(p); - ret = SDLNet_Init(); + if (SDLNet_Init() < 0) + { + I_Error("NET_SDL_InitClient: Failed to initialize SDLNet: %s", + SDLNet_GetError()); + } - if (!ret) - I_AtExit(SDLNet_Quit, true); + I_AtExit(SDLNet_Quit, true); udpsocket = SDLNet_UDP_Open(0); @@ -199,7 +201,6 @@ static boolean NET_SDL_InitClient(void) static boolean NET_SDL_InitServer(void) { int p; - int ret; if (initted) return true; @@ -208,10 +209,13 @@ static boolean NET_SDL_InitServer(void) if (p > 0) port = atoi(myargv[p+1]); - ret = SDLNet_Init(); + if (SDLNet_Init() < 0) + { + I_Error("NET_SDL_InitServer: Failed to initialize SDLNet: %s", + SDLNet_GetError()); + } - if (!ret) - I_AtExit(SDLNet_Quit, true); + I_AtExit(SDLNet_Quit, true); udpsocket = SDLNet_UDP_Open(port);