ソースを参照

fixing error when strict compilation warning on (error: format not a string literal and no format arguments)

Johannes Ruehle 12 年 前
コミット
c003fa8e90
1 ファイル変更2 行追加2 行削除
  1. 2 2
      core/basics/FileMgt.cpp

+ 2 - 2
core/basics/FileMgt.cpp

@@ -103,7 +103,7 @@ std::string FileMgt::createTempFile ( const std::string & templatefn )
 	if ( fd < 0 ) 
 	{
 		string errormessage = "FileMgt::createTempFile: FATAL ERROR unable to create temporary filename with template "+templatefn+".\n";
-		fprintf (stderr, errormessage.c_str());
+		fprintf (stderr,"%s", errormessage.c_str());
 		throw (errormessage.c_str());
 	}
 
@@ -123,7 +123,7 @@ void FileMgt::deleteTempFile ( const std::string & tempfile )
 #endif
     {
 		string errormessage = "FileMgt::deleteTempFile: FATAL ERROR removing "+tempfile+".\n";
-		fprintf (stderr, errormessage.c_str());
+		fprintf (stderr,"%s", errormessage.c_str());
 		throw (errormessage.c_str());
     }
 }