Commit a62daa3e authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Improve Coverity fix


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19424 4525493e-7705-40b1-a816-d608a930855b
parent 8bd7fde9
......@@ -60,14 +60,13 @@ int main( int argc, char** argv )
// Open the database and create a schema validation manager
IDatabaseSvc& dbSvc = app.databaseService();
IDatabasePtr db = dbSvc.openDatabase( dbId ); // open in readOnly mode
RalDatabase* ralDb =
dynamic_cast<TransRalDatabase*>( db.get() )->getRalDb();
if ( ralDb == 0 ) // Fix Coverity FORWARD_NULL)
TransRalDatabase* tralDb = dynamic_cast<TransRalDatabase*>( db.get() );
if ( tralDb == 0 ) // Fix Coverity FORWARD_NULL)
{
LOG << "ERROR! Dynamic cast to TransRalDatabase* failed?!" << ENDL;
return 1;
}
RalSchemaValidation sv( ralDb );
RalSchemaValidation sv( tralDb->getRalDb() );
// Validate the schema of the whole database
sv.validateDatabase();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment