Commit 78978aff authored by Julien Michel's avatar Julien Michel

COMP: Fixing coverity issue 1350182 (unchecked return value)

parent a119b012
......@@ -54,7 +54,14 @@ int otbGDALOverviewsBuilder(int itkNotUsed(argc), char* argv[])
otb::GDALImageIO::Pointer io = otb::GDALImageIO::New();
io->SetFileName(inputFilename);
io->CanReadFile(inputFilename);
bool canRead = io->CanReadFile(inputFilename);
if(!canRead)
{
std::cerr<<"Failed to read file "<< inputFilename <<" with GdalImageIO."<<std::endl;
return EXIT_FAILURE;
}
io->ReadImageInformation();
//std::cout << io->GetOverviewsCount() << std::endl;
......
Markdown is supported
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