diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-09-22 09:59:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-09-22 10:07:14 -0400 |
commit | 88d99fc1bd87b17517e49fd7ae82c0de6eaff992 (patch) | |
tree | c1926f824d1381243d9fcbbe9cbff495427eded0 /src/feature/relay | |
parent | 1cce0588e10b952d6acff8e55365011bdabbefdb (diff) | |
download | tor-88d99fc1bd87b17517e49fd7ae82c0de6eaff992.tar.gz tor-88d99fc1bd87b17517e49fd7ae82c0de6eaff992.zip |
Fix warnings when using two unusual options together.
The option `--enable-all-bugs-are-fatal` when used with
`--disable-module-relay` caused GCC to warn about functions that
it thought should be labeled noreturn.
I've tried a couple of approaches, but disabling the warning on
these functions seems to be the best approach.
Fixed #40129; bugfix on 0.4.4.1-alpha.
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/router.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 34d8163c36..75a3d2f35c 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -2488,6 +2488,10 @@ check_descriptor_bandwidth_changed(time_t now) } } +// This function can be "noreturn" if relay mode is disabled and +// ALL_BUGS_ARE_FATAL is set. +DISABLE_GCC_WARNING("-Wmissing-noreturn") + /** Note at log level severity that our best guess of address has changed from * <b>prev</b> to <b>cur</b>. */ void @@ -2517,6 +2521,7 @@ log_addr_has_changed(int severity, "Guessed our IP address as %s (source: %s).", addrbuf_cur, source); } +ENABLE_GCC_WARNING("-Wmissing-noreturn") /** Check whether our own address as defined by the Address configuration * has changed. This is for routers that get their address from a service |