diff --git a/src/feature/dircache/conscache.c b/src/feature/dircache/conscache.c index d9aaccddc1..2a831aa447 100644 --- a/src/feature/dircache/conscache.c +++ b/src/feature/dircache/conscache.c @@ -139,7 +139,7 @@ consensus_cache_may_overallocate(consensus_cache_t *cache) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" #endif -#endif +#endif /* defined(_WIN32) */ /** * Tell the sandbox (if any) configured by cfg to allow the diff --git a/src/feature/hs/hs_opts_st.h b/src/feature/hs/hs_opts_st.h index f6ee0f3cfa..279f0d6da6 100644 --- a/src/feature/hs/hs_opts_st.h +++ b/src/feature/hs/hs_opts_st.h @@ -27,4 +27,4 @@ **/ typedef struct hs_opts_t hs_opts_t; -#endif +#endif /* !defined(TOR_FEATURE_HS_HS_OPTS_ST_H) */ diff --git a/src/lib/crypt_ops/crypto_rsa_openssl.c b/src/lib/crypt_ops/crypto_rsa_openssl.c index d54db43b92..c96ee81fd3 100644 --- a/src/lib/crypt_ops/crypto_rsa_openssl.c +++ b/src/lib/crypt_ops/crypto_rsa_openssl.c @@ -583,15 +583,15 @@ rsa_private_key_too_long(RSA *rsa, int max_bits) dmp1 = RSA_get0_dmp1(rsa); dmq1 = RSA_get0_dmq1(rsa); iqmp = RSA_get0_iqmp(rsa); -#else +#else /* !(OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,1)) */ /* The accessors above did not exist in openssl 1.1.0. */ p = q = dmp1 = dmq1 = iqmp = NULL; RSA_get0_key(rsa, &n, &e, &d); -#endif +#endif /* OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,1) */ if (RSA_bits(rsa) > max_bits) return true; -#else +#else /* !defined(OPENSSL_1_1_API) */ n = rsa->n; e = rsa->e; p = rsa->p; @@ -600,7 +600,7 @@ rsa_private_key_too_long(RSA *rsa, int max_bits) dmp1 = rsa->dmp1; dmq1 = rsa->dmq1; iqmp = rsa->iqmp; -#endif +#endif /* defined(OPENSSL_1_1_API) */ if (n && BN_num_bits(n) > max_bits) return true; diff --git a/src/lib/subsys/subsys.h b/src/lib/subsys/subsys.h index b29015746e..62c0de026d 100644 --- a/src/lib/subsys/subsys.h +++ b/src/lib/subsys/subsys.h @@ -198,7 +198,7 @@ typedef struct subsys_fns_t { **/ #define SUBSYS_DECLARE_LOCATION() \ .location = __FILE__ -#endif +#endif /* !defined(COCCI) */ /** * Lowest allowed subsystem level. diff --git a/src/test/test_circuitbuild.c b/src/test/test_circuitbuild.c index 6934cf3d78..061f39937a 100644 --- a/src/test/test_circuitbuild.c +++ b/src/test/test_circuitbuild.c @@ -133,7 +133,7 @@ test_new_route_len_unhandled_exit(void *arg) #if !defined(__COVERITY__) && !defined(__clang_analyzer__) tt_skip(); #endif -#endif +#endif /* defined(ALL_BUGS_ARE_FATAL) */ MOCK(count_acceptable_nodes, mock_count_acceptable_nodes); diff --git a/src/test/test_dir.c b/src/test/test_dir.c index bf9a04b079..3a0b8237cb 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -3041,7 +3041,7 @@ test_dir_param_voting_lookup(void *arg) tt_str_op(smartlist_get(tor_get_captured_bug_log_(), 0), OP_EQ, "!(!ok)"); tor_end_capture_bugs_(); -#endif +#endif /* !defined(ALL_BUGS_ARE_FATAL) */ done: SMARTLIST_FOREACH(lst, char *, cp, tor_free(cp)); @@ -4997,7 +4997,7 @@ test_dir_purpose_needs_anonymity_returns_true_by_default(void *arg) #if !defined(__COVERITY__) && !defined(__clang_analyzer__) tt_skip(); #endif -#endif +#endif /* defined(ALL_BUGS_ARE_FATAL) */ tor_capture_bugs_(1); setup_full_capture_of_logs(LOG_WARN); diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c index 3b6e3fd213..e6b27d7a50 100644 --- a/src/test/test_hs_intropoint.c +++ b/src/test/test_hs_intropoint.c @@ -764,7 +764,7 @@ test_introduce1_validation(void *arg) ret = validate_introduce1_parsed_cell(cell); tor_end_capture_bugs_(); tt_int_op(ret, OP_EQ, -1); -#endif +#endif /* !defined(ALL_BUGS_ARE_FATAL) */ /* Reset legacy ID and make sure it's correct. */ memset(cell->legacy_key_id, 0, sizeof(cell->legacy_key_id));