* [PATCH] abg-comparison.cc: Tidy some corpus_diff code
@ 2020-07-01 10:54 Giuliano Procida
2020-07-10 16:02 ` Matthias Maennich
2020-07-27 9:59 ` Dodji Seketeli
0 siblings, 2 replies; 3+ messages in thread
From: Giuliano Procida @ 2020-07-01 10:54 UTC (permalink / raw)
To: libabigail; +Cc: dodji, kernel-team, gprocida
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>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] abg-comparison.cc: Tidy some corpus_diff code
2020-07-01 10:54 [PATCH] abg-comparison.cc: Tidy some corpus_diff code Giuliano Procida
@ 2020-07-10 16:02 ` Matthias Maennich
2020-07-27 9:59 ` Dodji Seketeli
1 sibling, 0 replies; 3+ messages in thread
From: Matthias Maennich @ 2020-07-10 16:02 UTC (permalink / raw)
To: Giuliano Procida; +Cc: libabigail, dodji, kernel-team
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.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] abg-comparison.cc: Tidy some corpus_diff code
2020-07-01 10:54 [PATCH] abg-comparison.cc: Tidy some corpus_diff code Giuliano Procida
2020-07-10 16:02 ` Matthias Maennich
@ 2020-07-27 9:59 ` Dodji Seketeli
1 sibling, 0 replies; 3+ messages in thread
From: Dodji Seketeli @ 2020-07-27 9:59 UTC (permalink / raw)
To: Giuliano Procida; +Cc: libabigail, kernel-team
Giuliano Procida <gprocida@google.com> a écrit:
> 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>
Applied to master, thanks!
Cheers,
--
Dodji
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-27 9:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 10:54 [PATCH] abg-comparison.cc: Tidy some corpus_diff code Giuliano Procida
2020-07-10 16:02 ` Matthias Maennich
2020-07-27 9:59 ` Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).