remove excessive warnings, formatting

This commit is contained in:
Roman Fomin 2024-01-07 01:28:00 +07:00
parent 2914d96495
commit 1a907867af
3 changed files with 16 additions and 18 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);