]> sourceware.org Git - libabigail.git/commit
abilint: fix return types bool -> int
authorMatthias Maennich via libabigail <libabigail@sourceware.org>
Mon, 15 Apr 2019 17:05:14 +0000 (18:05 +0100)
committerDodji Seketeli <dodji@redhat.com>
Tue, 16 Apr 2019 14:11:01 +0000 (16:11 +0200)
commiteec8e69b7d1aa3f6762564d2ea4810439422944c
treed09d2703964e487ba8632de3f1ae9be33af85d80
parent87bbc09b9ed693a2c59a27931f6c2b97e76d1a8e
abilint: fix return types bool -> int

Returning bool literals from main can be misleading. Returning booleans
maps to (by convention):

   return false -> converted to 0 -> rc=0 considered SUCCESS
   return true  -> converted to 1 -> rc=1 considered FAILURE

Compiling with clang also emits:

  abilint.cc:258:7: warning: bool literal returned from 'main' [-Wmain]
      return true;
      ^      ~~~~

The issues can be addressed by consistently returning integers as also
done in all other mains across the project.

Same issue applies to print-diff-tree.cc.

 * tools/abilint.cc: return int in main rather than bool.
 * tests/print-diff-tree.cc: Likewise.

Signed-off-by: Matthias Maennich <maennich@google.com>
tests/print-diff-tree.cc
tools/abilint.cc
This page took 0.03535 seconds and 5 git commands to generate.