public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@seketeli.org>
To: Giuliano Procida <gprocida@google.com>
Cc: libabigail@sourceware.org, kernel-team@android.com,
	"Matthias Männich" <maennich@google.com>
Subject: Re: [PATCH v3 1/1] Fix has_net_changes for --leaf-changes-only mode
Date: Tue, 21 Jul 2020 08:28:16 +0200	[thread overview]
Message-ID: <87wo2xgz5r.fsf@seketeli.org> (raw)
In-Reply-To: <CAGvU0H=gSM_2qnf9TtNcLrRvp0_N_oMDcexFVLPRuRtSrsQMgQ@mail.gmail.com> (Giuliano Procida's message of "Fri, 17 Jul 2020 17:34:59 +0100")

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

[...]

> This looks good to me and I concur it's more in keeping with the rest
> of the code.
>
> A couple of nits inline.

[...]

>> --- a/src/abg-default-reporter.cc
>> +++ b/src/abg-default-reporter.cc

[...]

>> +/// Test if a given instance of @ref corpus_diff carries changes whose
>> +/// reports are not suppressed by any suppression specification.  In
>> +/// effect, these are deemed incompatible ABI changes.
>> +///
>> +/// @param d the @ref corpus_diff to consider
>> +///
>> +/// @return true iff @p d carries subtype changes that are deemed
>> +/// incompatible ABI changes.
>> +bool
>> +default_reporter::diff_has_net_changes(const corpus_diff *d) const
>> +{
>> +  if (!d)
>> +    return false;
>> +
>> +  const corpus_diff::diff_stats& stats = const_cast<corpus_diff*>(d)->
>> +    apply_filters_and_suppressions_before_reporting();
>> +
>> +  // Logic here should match emit_diff_stats.
>> +  return (d->architecture_changed()
>
> I have a preference for not doing return (expression). It's not an
> issue if you find the extra parentheses help.

Ah, I keep the parenthesis around the returned expression there when the
return statements spans over multiple lines.  In that case, the editor
indents the returned expression "on its own", like it does for function
parameters etc.

>
>> +         ||d->soname_changed()
>
> Missing a space before the "d".

Fixed, thanks.

>
>> +         || stats.net_num_func_removed()
>> +         || stats.net_num_func_changed()
>> +         || stats.net_num_func_added()
>> +         || stats.net_num_vars_removed()
>> +         || stats.net_num_vars_changed()
>> +         || stats.net_num_vars_added()
>> +         || stats.net_num_removed_unreachable_types()
>> +         || stats.net_num_changed_unreachable_types()
>> +         || stats.net_num_added_unreachable_types()
>> +         || stats.net_num_removed_func_syms()
>> +         || stats.net_num_added_func_syms()
>> +         || stats.net_num_removed_var_syms()
>> +         || stats.net_num_added_var_syms());
>> +}
>> +

[...]

>> +bool
>> +leaf_reporter::diff_has_net_changes(const corpus_diff *d) const
>> +{
>> +  if (!d)
>> +    return false;
>> +
>> +  const corpus_diff::diff_stats& stats = const_cast<corpus_diff*>(d)->
>> +    apply_filters_and_suppressions_before_reporting();
>> +
>> +  // Logic here should match emit_diff_stats.
>> +  return (d->architecture_changed()
>
> Could also make this plain return expression.

I kept it for proper indentation purpuses as well.

> Thank you for the review and follow-up!

No problem.  Applied to master.

Cheers,

-- 
		Dodji

      reply	other threads:[~2020-07-21  6:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 17:13 [RFC] Fix has_net_changes for leaf-changes-only mode Giuliano Procida
2020-03-24 17:17 ` Giuliano Procida
2020-03-26 10:37 ` Matthias Maennich
2020-03-26 12:01   ` Giuliano Procida
2020-03-26 17:12 ` Dodji Seketeli
2020-03-27 18:42   ` Giuliano Procida
2020-03-27 19:01 ` [PATCH v2] Fix has_net_changes for --leaf-changes-only mode Giuliano Procida
2020-03-30  9:17   ` Matthias Maennich
2020-07-01 13:19     ` [PATCH v3 0/1] Fix abidiff exit code when diffs are suppressed Giuliano Procida
2020-07-01 13:19       ` [PATCH v3 1/1] Fix has_net_changes for --leaf-changes-only mode Giuliano Procida
2020-07-17 13:54         ` Dodji Seketeli
2020-07-17 16:34           ` Giuliano Procida
2020-07-21  6:28             ` Dodji Seketeli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo2xgz5r.fsf@seketeli.org \
    --to=dodji@seketeli.org \
    --cc=gprocida@google.com \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).