From 3311b00ae6f150aec8629b860f28c4bf92abef33 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 17 Mar 2012 22:32:01 +0100 Subject: [PATCH] fix warning: format not a string literal and no format arguments --- contrib/bobtoolz/DBrush.cpp | 2 +- libs/synapse/synapse.cpp | 2 +- radiant/main.cpp | 4 ++-- tools/quake3/common/inout.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/bobtoolz/DBrush.cpp b/contrib/bobtoolz/DBrush.cpp index 34afabf..3e54e79 100644 --- a/contrib/bobtoolz/DBrush.cpp +++ b/contrib/bobtoolz/DBrush.cpp @@ -694,7 +694,7 @@ void DBrush::SaveToFile( FILE *pFile ){ ( *pp )->texInfo.m_fScale[0], ( *pp )->texInfo.m_fScale[0], ( *pp )->texInfo.m_fRotate ); - fprintf( pFile, buffer ); + fprintf( pFile, "%s", buffer ); } fprintf( pFile, "}\n" ); diff --git a/libs/synapse/synapse.cpp b/libs/synapse/synapse.cpp index 482204f..c4dd78c 100644 --- a/libs/synapse/synapse.cpp +++ b/libs/synapse/synapse.cpp @@ -65,7 +65,7 @@ void Syn_Printf( const char *text, ... ){ va_start( args, text ); vsnprintf( buf, BUFFER_SIZE, text, args ); buf[BUFFER_SIZE - 1] = 0; - printf( buf ); + printf( "%s", buf ); va_end( args ); } } diff --git a/radiant/main.cpp b/radiant/main.cpp index 8e26926..2fa5221 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -1145,7 +1145,7 @@ void RunBsp( char *command ){ Error( "Can't write to %s", batpath ); } fprintf( hFile, "#!/bin/sh \n\n" ); - fprintf( hFile, strSys.GetBuffer() ); + fprintf( hFile, "%s", strSys.GetBuffer() ); fclose( hFile ); chmod( batpath, 0744 ); #endif @@ -1158,7 +1158,7 @@ void RunBsp( char *command ){ if ( !hFile ) { Error( "Can't write to %s", batpath ); } - fprintf( hFile, strSys.GetBuffer() ); + fprintf( hFile, "%s", strSys.GetBuffer() ); fclose( hFile ); #endif diff --git a/tools/quake3/common/inout.c b/tools/quake3/common/inout.c index 74a111b..acf492a 100644 --- a/tools/quake3/common/inout.c +++ b/tools/quake3/common/inout.c @@ -264,7 +264,7 @@ void FPrintf( int flag, char *buf ){ static qboolean bGotXML = qfalse; char level[2]; - printf( buf ); + printf( "%s", buf ); // the following part is XML stuff only.. but maybe we don't want that message to go down the XML pipe? if ( flag == SYS_NOXML ) {