From 3ce2304c6d031020cd8a1f00dee6e87fbf40ecd4 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 2 Dec 2019 17:04:17 -0500 Subject: Use new ENABLE/DISABLE_GCC_WARNING This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch] --- src/lib/tls/tortls_nss.c | 4 ++-- src/lib/tls/tortls_openssl.c | 4 ++-- src/lib/tls/x509_openssl.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/tls') diff --git a/src/lib/tls/tortls_nss.c b/src/lib/tls/tortls_nss.c index 3c62e98df1..3401c41005 100644 --- a/src/lib/tls/tortls_nss.c +++ b/src/lib/tls/tortls_nss.c @@ -34,7 +34,7 @@ #include "lib/tls/nss_countbytes.h" #include "lib/log/util_bug.h" -DISABLE_GCC_WARNING(strict-prototypes) +DISABLE_GCC_WARNING("-Wstrict-prototypes") #include // For access to rar sockets. #include @@ -42,7 +42,7 @@ DISABLE_GCC_WARNING(strict-prototypes) #include #include #include -ENABLE_GCC_WARNING(strict-prototypes) +ENABLE_GCC_WARNING("-Wstrict-prototypes") static SECStatus always_accept_cert_cb(void *, PRFileDesc *, PRBool, PRBool); diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c index 9184cafd60..2252e480be 100644 --- a/src/lib/tls/tortls_openssl.c +++ b/src/lib/tls/tortls_openssl.c @@ -37,7 +37,7 @@ /* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in * srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */ -DISABLE_GCC_WARNING(redundant-decls) +DISABLE_GCC_WARNING("-Wredundant-decls") #include @@ -54,7 +54,7 @@ DISABLE_GCC_WARNING(redundant-decls) #include #include -ENABLE_GCC_WARNING(redundant-decls) +ENABLE_GCC_WARNING("-Wredundant-decls") #include "lib/tls/tortls.h" #include "lib/tls/tortls_st.h" diff --git a/src/lib/tls/x509_openssl.c b/src/lib/tls/x509_openssl.c index 7724288279..d1fe899019 100644 --- a/src/lib/tls/x509_openssl.c +++ b/src/lib/tls/x509_openssl.c @@ -19,7 +19,7 @@ /* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in * srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */ -DISABLE_GCC_WARNING(redundant-decls) +DISABLE_GCC_WARNING("-Wredundant-decls") #include @@ -36,7 +36,7 @@ DISABLE_GCC_WARNING(redundant-decls) #include #include -ENABLE_GCC_WARNING(redundant-decls) +ENABLE_GCC_WARNING("-Wredundant-decls") #include "lib/log/log.h" #include "lib/log/util_bug.h" -- cgit v1.2.3-54-g00ecf From 8bb686d8a01c975c12b6b78a89faeb45bd778518 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 16 Dec 2019 12:58:58 -0500 Subject: Include x509.h in tortls_internal.h. This gives us the definition of tor_x509_cert_impl_t, and makes us less dependent on include order. --- src/lib/tls/tortls_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/tls') diff --git a/src/lib/tls/tortls_internal.h b/src/lib/tls/tortls_internal.h index a7aee524f3..8b7f78233a 100644 --- a/src/lib/tls/tortls_internal.h +++ b/src/lib/tls/tortls_internal.h @@ -11,6 +11,8 @@ #ifndef TORTLS_INTERNAL_H #define TORTLS_INTERNAL_H +#include "lib/tls/x509.h" + int tor_errno_to_tls_error(int e); #ifdef ENABLE_OPENSSL int tor_tls_get_error(tor_tls_t *tls, int r, int extra, -- cgit v1.2.3-54-g00ecf