public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] Correct various inconsequential typos.
  2020-01-01  0:00 [PATCH] Correct various inconsequential typos Giuliano Procida via libabigail
@ 2020-01-01  0:00 ` Dodji Seketeli
  0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2020-01-01  0:00 UTC (permalink / raw)
  To: Giuliano Procida; +Cc: libabigail, kernel-team

Hey Giuliano,

Giuliano Procida <gprocida@google.com> a écrit:

> In the leaf reporter member subtype changes are labelled as plain
> changes and vice versa. This was probably due to the different
> ordering of the code sections in the default and leaf reporters.
> Output is unchanged as these tags currently map to the same strings.
>
> When generating diff reports there were some rare cases where a
> pretty representation might have been emitted twice or the trailing
> whitespace might have been missing.
>
> 	* src/abg-leaf-reporter.cc: report(class_or_union_diff) Swap
> 	calls to report_mem_header to match the rest of the code.
> 	* src/abg-reporter-priv.cc: represent(var_diff_sptr) Add some
>         missing whitespace; remember we've emitted the pretty
>         representation in 2 cases where this was omitted (though 1 of
>         these is the last case where it makes no difference).
>         maybe_report_diff_for_symbol Add some missing whitespace;
>         remember we've reported a diff (and need a trailing newline)
>         in 1 case where this was omitted, also affecting the
>         return value of the function (but no caller cares).

This looks god to me, so I have pushed it to master.

I have just edited the to make it comply wih the ChangeLog editing
rules.  It now looks like:

------------------>8<----------------------
Correct various inconsequential typos.

In the leaf reporter member subtype changes are labelled as plain
changes and vice versa. This was probably due to the different
ordering of the code sections in the default and leaf reporters.
Output is unchanged as these tags currently map to the same strings.

When generating diff reports there were some rare cases where a
pretty representation might have been emitted twice or the trailing
whitespace might have been missing.

	* src/abg-leaf-reporter.cc (report): In the class_or_union_diff
	overoad, swap calls to report_mem_header to match the rest of the
	code.
	* src/abg-reporter-priv.cc (represent): In the var_diff_sptr
	overload, add some missing whitespace; remember we've emitted the
	pretty representation in 2 cases where this was omitted (though 1
	of these is the last case where it makes no difference).
	maybe_report_diff_for_symbol Add some missing whitespace; remember
	we've reported a diff (and need a trailing newline) in 1 case
	where this was omitted, also affecting the return value of the
	function (but no caller cares).
------------------>8<----------------------

Thanks!

Cheers,

-- 
		Dodji

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Correct various inconsequential typos.
@ 2020-01-01  0:00 Giuliano Procida via libabigail
  2020-01-01  0:00 ` Dodji Seketeli
  0 siblings, 1 reply; 2+ messages in thread
From: Giuliano Procida via libabigail @ 2020-01-01  0:00 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, gprocida

In the leaf reporter member subtype changes are labelled as plain
changes and vice versa. This was probably due to the different
ordering of the code sections in the default and leaf reporters.
Output is unchanged as these tags currently map to the same strings.

When generating diff reports there were some rare cases where a
pretty representation might have been emitted twice or the trailing
whitespace might have been missing.

	* src/abg-leaf-reporter.cc: report(class_or_union_diff) Swap
	calls to report_mem_header to match the rest of the code.
	* src/abg-reporter-priv.cc: represent(var_diff_sptr) Add some
        missing whitespace; remember we've emitted the pretty
        representation in 2 cases where this was omitted (though 1 of
        these is the last case where it makes no difference).
        maybe_report_diff_for_symbol Add some missing whitespace;
        remember we've reported a diff (and need a trailing newline)
        in 1 case where this was omitted, also affecting the
        return value of the function (but no caller cares).

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 src/abg-leaf-reporter.cc | 4 ++--
 src/abg-reporter-priv.cc | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc
index 791b301c..86a9ba2f 100644
--- a/src/abg-leaf-reporter.cc
+++ b/src/abg-leaf-reporter.cc
@@ -647,7 +647,7 @@ leaf_reporter::report(const class_or_union_diff& d,
       bool emitted_data_members_changes = false;
       if (net_numchanges)
 	{
-	  report_mem_header(out, subtype_change_kind, "data member", indent);
+	  report_mem_header(out, change_kind, "data member", indent);
 	  for (var_diff_sptrs_type::const_iterator it =
 		 d.class_or_union_diff::get_priv()->
 		 sorted_changed_dm_.begin();
@@ -676,7 +676,7 @@ leaf_reporter::report(const class_or_union_diff& d,
       if (net_numchanges)
 	{
 	  if (!emitted_data_members_changes)
-	    report_mem_header(out, change_kind, "data member", indent);
+	    report_mem_header(out, subtype_change_kind, "data member", indent);
 	  for (var_diff_sptrs_type::const_iterator it =
 		 d.class_or_union_diff::get_priv()->sorted_subtype_changed_dm_.begin();
 	       it != d.class_or_union_diff::get_priv()->sorted_subtype_changed_dm_.end();
diff --git a/src/abg-reporter-priv.cc b/src/abg-reporter-priv.cc
index 78ebd91b..2a0880bc 100644
--- a/src/abg-reporter-priv.cc
+++ b/src/abg-reporter-priv.cc
@@ -446,7 +446,7 @@ represent(const var_diff_sptr	&diff,
 	      << indent << "to:\n"
 	      << indent << " " << get_type_name(n->get_type()) << "\n"
 	      << indent << " This is usually due to "
-	      <<"an anonymous member type being added or removed from "
+	      << "an anonymous member type being added or removed from "
 	      << "the containing type\n";
 	}
     }
@@ -645,6 +645,7 @@ represent(const var_diff_sptr	&diff,
 	out << ", ";
       out << "visibility changed from " << o->get_visibility()
 	  << " to " << n->get_visibility();
+      emitted = true;
     }
   if ((ctxt->get_allowed_category() & ACCESS_CHANGE_CATEGORY)
       && (get_member_access_specifier(o)
@@ -683,6 +684,7 @@ represent(const var_diff_sptr	&diff,
 	out << "is no more static";
       else
 	out << "now becomes static";
+      emitted = true;
     }
 }
 
@@ -1090,7 +1092,7 @@ maybe_report_diff_for_symbol(const elf_symbol_sptr&	symbol1,
 {
   bool reported = false;
 
-  if (!symbol1 ||!symbol2 || symbol1 == symbol2)
+  if (!symbol1 || !symbol2 || symbol1 == symbol2)
     return reported;
 
   if (symbol1->get_size() != symbol2->get_size())
@@ -1180,6 +1182,8 @@ maybe_report_diff_for_symbol(const elf_symbol_sptr&	symbol1,
       out << symbol1->get_version().str()
 	  << " to "
 	  << symbol2->get_version().str();
+
+      reported = true;
     }
 
   if (reported)
-- 
2.25.0.265.gbab2e86ba0-goog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-06 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01  0:00 [PATCH] Correct various inconsequential typos Giuliano Procida via libabigail
2020-01-01  0:00 ` 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).