MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / SaveFile

Method SaveFile

externals/tinyxml2/tinyxml2.cpp:2417–2433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2415
2416
2417XMLError XMLDocument::SaveFile( const char* filename, bool compact )
2418{
2419 if ( !filename ) {
2420 TIXMLASSERT( false );
2421 SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=<null>" );
2422 return _errorID;
2423 }
2424
2425 FILE* fp = callfopen( filename, "w" );
2426 if ( !fp ) {
2427 SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=%s", filename );
2428 return _errorID;
2429 }
2430 SaveFile(fp, compact);
2431 fclose( fp );
2432 return _errorID;
2433}
2434
2435
2436XMLError XMLDocument::SaveFile( FILE* fp, bool compact )

Callers

nothing calls this directly

Calls 1

callfopenFunction · 0.85

Tested by

no test coverage detected