[Asterisk-code-review] backtrace: Avoid -Wlogical-not-parentheses. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Wed Jan 31 12:17:31 CST 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/8105 )

Change subject: backtrace: Avoid -Wlogical-not-parentheses.
......................................................................


Patch Set 1:

> > OK. I am a bit confused about your ‘more’. According to clang
 > (and
 > > my book about precedence) your proposal changes the code. clang
 > > offers both alternatives as suggestion. So, this was a bug
 > > actually?
 > 
 > Yes I think the compiler really found a bug.
 > 
 > bfd_get_section_flags() returns flags and SEC_ALLOC is one of those
 > flags we could test.  According to the comments associated with
 > SEC_ALLOC, the current section is allocated if set.  i.e., It has
 > program code (or constant data) in it.  If not set the section is
 > only debug information.
 > 
 > So the if expression was trying to say: If the bfd section does not
 > have code in it or the section's code contents does not contain the
 > offset address then skip the section.

If this change has the potential to change the output of a backtrace I think the commit message should say something like:
backtrace: Avoid potential spurious output.


Something to reflect that this is fixing an actual coding error, current message implies that we're just suppressing a warning.


-- 
To view, visit https://gerrit.asterisk.org/8105
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I9ec3e144d425a976c02811bd23cd0c533d2eca4e
Gerrit-Change-Number: 8105
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 31 Jan 2018 18:17:31 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180131/4e16bfc2/attachment.html>


More information about the asterisk-code-review mailing list