[PATCH] abg-comparison.cc: Tidy some corpus_diff code
Matthias Maennich
maennich@google.com
Fri Jul 10 16:02:45 GMT 2020
On Wed, Jul 01, 2020 at 11:54:26AM +0100, Android Kernel Team wrote:
>This commit fixes up some code whitespace for style and consitency,
>renames a poorly-named variable and fixes a comment typo.
>
>There are no behavioural changes.
>
> * src/abg-comparison.cc (corpus_diff::priv::emit_diff_stats):
> Adjust code whitespace; rename the second instance of
> total_nb_variable_changes to
> total_nb_unreachable_type_changes.
> (corpus_diff::has_incompatible_changes): Fix comment typo.
>
>Signed-off-by: Giuliano Procida <gprocida@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>---
> src/abg-comparison.cc | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
>diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
>index 88f0bdeb..e4b86426 100644
>--- a/src/abg-comparison.cc
>+++ b/src/abg-comparison.cc
>@@ -10099,7 +10099,6 @@ corpus_diff::priv::emit_diff_stats(const diff_stats& s,
> out << " (" << num_filtered << " filtered out)";
> out << "\n";
>
>-
> out << indent << "Changed leaf types summary: "
> << s.net_num_leaf_type_changes();
> if (s.num_leaf_type_changes_filtered_out())
>@@ -10137,7 +10136,6 @@ corpus_diff::priv::emit_diff_stats(const diff_stats& s,
>
> // variables changes summary
> out << indent << "Removed/Changed/Added variables summary: ";
>-
> out << s.net_num_vars_removed() << " Removed";
> if (s.num_removed_vars_filtered_out())
> out << " (" << s.num_removed_vars_filtered_out()
>@@ -10180,7 +10178,7 @@ corpus_diff::priv::emit_diff_stats(const diff_stats& s,
> out << " (" << s.num_changed_func_filtered_out() << " filtered out)";
> out << ", ";
>
>- out << s.net_num_func_added()<< " Added";
>+ out << s.net_num_func_added() << " Added";
> if (s.num_added_func_filtered_out())
> out << " (" << s.num_added_func_filtered_out() << " filtered out)";
> if (total_nb_function_changes <= 1)
>@@ -10194,7 +10192,6 @@ corpus_diff::priv::emit_diff_stats(const diff_stats& s,
> + s.num_vars_changed() + s.num_vars_added();
>
> out << indent << "Variables changes summary: ";
>-
> out << s.net_num_vars_removed() << " Removed";
> if (s.num_removed_vars_filtered_out())
> out << " (" << s.num_removed_vars_filtered_out()
>@@ -10221,7 +10218,7 @@ corpus_diff::priv::emit_diff_stats(const diff_stats& s,
> // functions/variables.
> if (ctxt->show_unreachable_types())
> {
>- size_t total_nb_variable_changes =
>+ size_t total_nb_unreachable_type_changes =
> s.num_removed_unreachable_types()
> + s.num_changed_unreachable_types()
> + s.num_added_unreachable_types();
>@@ -10247,7 +10244,7 @@ corpus_diff::priv::emit_diff_stats(const diff_stats& s,
> if (s.num_added_unreachable_types_filtered_out())
> out << " (" << s.num_added_unreachable_types_filtered_out()
> << " filtered out)";
>- if (total_nb_variable_changes <= 1)
>+ if (total_nb_unreachable_type_changes <= 1)
> out << " type";
> else
> out << " types";
>@@ -10808,7 +10805,7 @@ corpus_diff::has_incompatible_changes() const
> || stats.net_num_func_removed() != 0
> || (stats.num_func_with_virtual_offset_changes() != 0
> // If all reports about functions with sub-type changes
>- // have been suppressd, then even those about functions
>+ // have been suppressed, then even those about functions
> // that are virtual don't matter anymore because the
> // user willingly requested to shut them down
> && stats.net_num_func_changed() != 0)
>--
>2.27.0.212.ge8ba1cc988-goog
>
>--
>To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com.
>
More information about the Libabigail
mailing list