Procházet zdrojové kódy

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

Johannes Ruehle před 12 roky
rodič
revize
c003fa8e90
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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());
     }
 }