]> sourceware.org Git - libabigail.git/commitdiff
abg-comparison.cc: Tidy some corpus_diff code
authorGiuliano Procida <gprocida@google.com>
Wed, 1 Jul 2020 10:54:26 +0000 (11:54 +0100)
committerDodji Seketeli <dodji@redhat.com>
Mon, 27 Jul 2020 09:59:07 +0000 (11:59 +0200)
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

index a9ef16103b4ade3ac2ec044d72db8e30000584e6..636a4737da0fd2007bc83e0d0300b78a0658acb4 100644 (file)
@@ -10104,7 +10104,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())
@@ -10142,7 +10141,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()
@@ -10185,7 +10183,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)
@@ -10199,7 +10197,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()
@@ -10226,7 +10223,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();
@@ -10252,7 +10249,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";
@@ -10813,7 +10810,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)
This page took 0.04048 seconds and 5 git commands to generate.