Opened 2 years ago

Closed 2 years ago

#21826 closed defect (duplicate)

clang warnings because of "empty" hs_service.c file in 0.3.0

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor: SponsorR-can

Description (last modified by asn)

Currently (in 0.3.0) the code in hs_service.c is disabled using #ifdef TOR_UNIT_TESTS and is only used for unittests. We will remove these #ifdef guards in 0.3.2 when we merge the rest of the service-side code.

Unfortunately, as it seems having an empty .c file is no good, since empty translation units (i.e. files) are undefined behavior in C.

Sebastian pointed this out, and said that his clang is throwing warnings at him because of that. He says that compilation proceeds normally, but it might be a good thing to fix anyhow.

We could fix this by adding a static variable on top to silence the warning, or by removing the #ifdef guards.

Child Tickets

Change History (2)

comment:1 Changed 2 years ago by asn

Description: modified (diff)

comment:2 Changed 2 years ago by asn

Resolution: duplicate
Status: newclosed

Ugh this is a duplicate of #21825.

Note: See TracTickets for help on using tickets.