Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#14296 closed defect (fixed)

Avoid redundant check for NULL defport->unix_addr in config.c

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version: Tor: 0.2.6.2-alpha
Severity: Keywords: clang
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by teor)

Anything in the middle of a structure will always be non-null.
clang 3.6.0 warns on this because it is redundant.

See my branch config-remove-redundant-assert in my teor2345 github.

Child Tickets

Change History (5)

comment:1 Changed 5 years ago by nickm

Parent ID: #14254
Status: newneeds_review

Looks like this was made on top of another branch instead of master?

Also, I'm going to make this a child of #14254, since I'm pretty sure that branch will replace the code in question. I'm pretty sure that if we merge that one, this problem will go away.

comment:2 Changed 5 years ago by teor

Apologies, I must have rebased the wrong branch. Oops!

Try bug14296-config-redundant-assert if necessary.
(The latest git won't build with clang at the moment, at least with --enable-gcc-warnings, which is the default.)

comment:3 Changed 5 years ago by nickm

I've merged the ticket for #14254 instead; please let me know if the issue didn't go away.

comment:4 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

comment:5 Changed 5 years ago by teor

Description: modified (diff)
Parent ID: #14254

Note:

clang version 3.6.0 (branches/release_36 226372)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
Note: See TracTickets for help on using tickets.