Skip to content

Commit

Permalink
remove useless \n in Log::Warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Morel Bérenger authored and Morel Bérenger committed Mar 28, 2023
1 parent d0d2bb9 commit 34a0a82
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/engine/client/cl_download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void CL_WWWDownload()
if ( strlen( clc.redirectedList ) + strlen( cls.originalDownloadName ) + 1 >= sizeof( clc.redirectedList ) )
{
// just to be safe
Log::Warn( "redirectedList overflow (%s)\n", clc.redirectedList );
Log::Warn( "redirectedList overflow (%s)", clc.redirectedList );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/engine/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,7 @@ void CL_GlobalServers_f()
{
if ( !wildcard )
{
Log::Warn( "CL_GlobalServers_f: No master server address given.\n" );
Log::Warn( "CL_GlobalServers_f: No master server address given." );
}
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/engine/framework/VirtualMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ void VMBase::Free()
int status;
if (waitpid(processHandle, &status, WNOHANG) != 0) {
if (WIFSIGNALED(status))
Log::Warn("VM exited with signal %d: %s\n", WTERMSIG(status), strsignal(WTERMSIG(status)));
Log::Warn("VM exited with signal %d: %s", WTERMSIG(status), strsignal(WTERMSIG(status)));
else if (WIFEXITED(status))
Log::Warn("VM exited with non-zero exit code %d\n", WEXITSTATUS(status));
Log::Warn("VM exited with non-zero exit code %d", WEXITSTATUS(status));
}
kill(processHandle, SIGKILL);
waitpid(processHandle, nullptr, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/engine/qcommon/net_ip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ SOCKET NET_IP6Socket( const char *net_interface, int port, struct sockaddr_in6 *

if ( bind( newsocket, ( struct sockaddr * ) &address, sizeof( address ) ) == SOCKET_ERROR )
{
Log::Warn( "NET_IP6Socket: bind: %s\n", NET_ErrorString() );
Log::Warn( "NET_IP6Socket: bind: %s", NET_ErrorString() );
*err = socketError;
closesocket( newsocket );
return INVALID_SOCKET;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/renderer/gl_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ void GLShaderManager::PrintInfoLog( GLuint object) const
}
else
{
Log::Warn( "object is not a shader or program\n" );
Log::Warn( "object is not a shader or program" );
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/engine/renderer/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3918,7 +3918,7 @@ void R_LoadLightGrid( lump_t *l )

if ( static_cast<size_t>(l->filelen) != w->numLightGridPoints * sizeof( dgridPoint_t ) )
{
Log::Warn("light grid mismatch, default light grid used\n" );
Log::Warn("light grid mismatch, default light grid used" );

// generate default 1x1x1 light grid
w->lightGridSize[ 0 ] = 100000.0f;
Expand Down Expand Up @@ -4459,7 +4459,7 @@ void R_LoadEntities( lump_t *l )
vec_t rad_y, rad_z;
sscanf( value, "%f %f %f", &light->l.radius, &rad_y, &rad_z );
if( rad_y != light->l.radius || rad_z != light->l.radius )
Log::Warn( "non-spherical light\n" );
Log::Warn( "non-spherical light" );
s = &value[ 0 ];
}
// check for light_target
Expand Down
2 changes: 1 addition & 1 deletion src/engine/renderer/tr_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ fontInfo_t* RE_RegisterFont( const char *fontName, const char *fallbackName, int

if ( FT_Set_Char_Size( fallback, pointSize << 6, pointSize << 6, 72, 72 ) )
{
Log::Warn("RE_RegisterFont: FreeType2, Unable to set face char size.\n" );
Log::Warn("RE_RegisterFont: FreeType2, Unable to set face char size." );
FT_Done_Face( fallback );
RE_FreeFontFile( fallbackData );
FT_Done_Face( face );
Expand Down
2 changes: 1 addition & 1 deletion src/engine/renderer/tr_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ void R_UploadImage( const byte **dataArray, int numLayers, int numMips, image_t
else if ( image->bits & ( IF_RGBA32UI ) )
{
if( !glConfig2.textureIntegerAvailable ) {
Log::Warn( "integer image '%s' cannot be loaded\n", image->name );
Log::Warn( "integer image '%s' cannot be loaded", image->name );
}
internalFormat = GL_RGBA32UI;
format = GL_RGBA_INTEGER;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/renderer/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3218,7 +3218,7 @@ static bool ParseStage( shaderStage_t *stage, const char **text )

// check that depthFade and depthWrite are mutually exclusive
if ( depthMaskBits && stage->hasDepthFade ) {
Log::Warn( "depth fade conflicts with depth mask in shader '%s'\n", shader.name );
Log::Warn( "depth fade conflicts with depth mask in shader '%s'", shader.name );
stage->hasDepthFade = false;
}

Expand Down
4 changes: 2 additions & 2 deletions src/engine/server/sv_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1500,10 +1500,10 @@ void SV_ExecuteClientMessage( client_t *cl, msg_t *msg )
} else if (c == clc_moveNoDelta) {
SV_UserMove(cl, msg, false);
} else if (c != clc_EOF) {
Log::Warn("bad command byte for client %i\n", (int) (cl - svs.clients));
Log::Warn("bad command byte for client %i", (int) (cl - svs.clients));
}
if (c != clc_EOF && MSG_ReadByte(msg) != clc_EOF) {
Log::Warn("missing clc_EOF byte for client %i\n", (int) (cl - svs.clients));
Log::Warn("missing clc_EOF byte for client %i", (int) (cl - svs.clients));
}

// TODO: track bytes read
Expand Down
2 changes: 1 addition & 1 deletion src/engine/server/sv_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ void SV_SendClientIdle( client_t *client )
// check for overflow
if ( msg.overflowed )
{
Log::Warn( "msg overflowed for %s\n", client->name );
Log::Warn( "msg overflowed for %s", client->name );
MSG_Clear( &msg );

SV_DropClient( client, "Msg overflowed" );
Expand Down
2 changes: 1 addition & 1 deletion src/shared/client/cg_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ int trap_R_BlendSkeleton( refSkeleton_t *skel, const refSkeleton_t *blend, float

if ( skel->numBones != blend->numBones )
{
Log::Warn("trap_R_BlendSkeleton: different number of bones %d != %d\n", skel->numBones, blend->numBones);
Log::Warn("trap_R_BlendSkeleton: different number of bones %d != %d", skel->numBones, blend->numBones);
return false;
}

Expand Down

0 comments on commit 34a0a82

Please sign in to comment.