[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.4.6] Suppress strict-prototypes warning on NSS pk11pub.h header
commit fce99957e238706912a6e940c878648b6ebd8f2b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Jun 28 09:08:31 2021 -0400
Suppress strict-prototypes warning on NSS pk11pub.h header
We already did this in a couple of places, but there are more that
we didn't get. This is necessary for systems with versions of
NSS that don't do their prototypes properly.
Fixes #40409; bugfix on 0.3.5.1-alpha.
---
src/lib/crypt_ops/crypto_dh_nss.c | 2 ++
src/lib/crypt_ops/crypto_rand.c | 2 ++
src/lib/crypt_ops/crypto_rsa_nss.c | 2 ++
src/lib/crypt_ops/crypto_s2k.c | 2 ++
src/lib/tls/x509_nss.c | 2 ++
5 files changed, 10 insertions(+)
diff --git a/src/lib/crypt_ops/crypto_dh_nss.c b/src/lib/crypt_ops/crypto_dh_nss.c
index 018db8bf43..e5d070397d 100644
--- a/src/lib/crypt_ops/crypto_dh_nss.c
+++ b/src/lib/crypt_ops/crypto_dh_nss.c
@@ -17,9 +17,11 @@
#include "lib/log/util_bug.h"
#include "lib/malloc/malloc.h"
+DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <cryptohi.h>
#include <keyhi.h>
#include <pk11pub.h>
+ENABLE_GCC_WARNING("-Wstrict-prototypes")
static int dh_initialized = 0;
static SECKEYDHParams tls_dh_param, circuit_dh_param;
diff --git a/src/lib/crypt_ops/crypto_rand.c b/src/lib/crypt_ops/crypto_rand.c
index ce6f21dbb4..b1e3dcb6fa 100644
--- a/src/lib/crypt_ops/crypto_rand.c
+++ b/src/lib/crypt_ops/crypto_rand.c
@@ -50,9 +50,11 @@ ENABLE_GCC_WARNING("-Wredundant-decls")
#endif /* defined(ENABLE_OPENSSL) */
#ifdef ENABLE_NSS
+DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <pk11pub.h>
#include <secerr.h>
#include <prerror.h>
+ENABLE_GCC_WARNING("-Wstrict-prototypes")
#endif
#if __GNUC__ && GCC_VERSION >= 402
diff --git a/src/lib/crypt_ops/crypto_rsa_nss.c b/src/lib/crypt_ops/crypto_rsa_nss.c
index 66f325e868..d316910b32 100644
--- a/src/lib/crypt_ops/crypto_rsa_nss.c
+++ b/src/lib/crypt_ops/crypto_rsa_nss.c
@@ -23,9 +23,11 @@
#include <string.h>
+DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <keyhi.h>
#include <pk11pub.h>
#include <secder.h>
+ENABLE_GCC_WARNING("-Wstrict-prototypes")
#ifdef ENABLE_OPENSSL
#include <openssl/rsa.h>
diff --git a/src/lib/crypt_ops/crypto_s2k.c b/src/lib/crypt_ops/crypto_s2k.c
index 3a9ed5ef58..cdd8eb3a15 100644
--- a/src/lib/crypt_ops/crypto_s2k.c
+++ b/src/lib/crypt_ops/crypto_s2k.c
@@ -26,7 +26,9 @@
#include <openssl/evp.h>
#endif
#ifdef ENABLE_NSS
+DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <pk11pub.h>
+ENABLE_GCC_WARNING("-Wstrict-prototypes")
#endif
#if defined(HAVE_LIBSCRYPT_H) && defined(HAVE_LIBSCRYPT_SCRYPT)
diff --git a/src/lib/tls/x509_nss.c b/src/lib/tls/x509_nss.c
index 341bb57104..9ee92e9fb0 100644
--- a/src/lib/tls/x509_nss.c
+++ b/src/lib/tls/x509_nss.c
@@ -20,11 +20,13 @@
#include "lib/encoding/time_fmt.h"
#include "lib/string/printf.h"
+DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <pk11pub.h>
#include <cryptohi.h>
#include <cert.h>
#include <keyhi.h>
#include <time.h>
+ENABLE_GCC_WARNING("-Wstrict-prototypes")
/* Units of PRTime per second.
*
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits