Fix the --verbose option

When a binary cannot be analyzed by abipkgdiff, silently skip it
unless --verbose is used, in which case, display a message saying
that it couldn't be analyzed.

	* tools/abipkgdiff.cc (compare): In the elf_file overload, do not
	emit an error message when a binary could not be analyzed unless
	--verbose was provided.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2015-07-17 09:53:48 +02:00
parent 317f4e1ff3
commit 7f67f2573d

View File

@ -397,9 +397,10 @@ compare(const elf_file& elf1,
c1_status);
if (!(c1_status & abigail::dwarf_reader::STATUS_OK))
{
cerr << "could not read file '"
<< elf1.path
<< "' properly\n";
if (verbose)
cerr << "could not read file '"
<< elf1.path
<< "' properly\n";
return false;
}
@ -416,9 +417,10 @@ compare(const elf_file& elf1,
c2_status);
if (!(c2_status & abigail::dwarf_reader::STATUS_OK))
{
cerr << "could not find the read file '"
<< elf2.path
<< "' properly\n";
if (verbose)
cerr << "could not find the read file '"
<< elf2.path
<< "' properly\n";
return false;
}