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]
This commit is contained in:
Nick Mathewson
2019-12-02 17:04:17 -05:00
parent 792e5b2403
commit 3ce2304c6d
25 changed files with 55 additions and 55 deletions
+2 -2
View File
@@ -15,10 +15,10 @@
#include "lib/crypt_ops/crypto_util.h"
#include "lib/log/util_bug.h"
DISABLE_GCC_WARNING(strict-prototypes)
DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <pk11pub.h>
#include <secerr.h>
ENABLE_GCC_WARNING(strict-prototypes)
ENABLE_GCC_WARNING("-Wstrict-prototypes")
aes_cnt_cipher_t *
aes_new_cipher(const uint8_t *key, const uint8_t *iv,
+2 -2
View File
@@ -28,7 +28,7 @@
#error "We require OpenSSL >= 1.0.0"
#endif
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <stdlib.h>
#include <string.h>
@@ -37,7 +37,7 @@ DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/engine.h>
#include <openssl/modes.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
#include "lib/crypt_ops/aes.h"
#include "lib/log/log.h"
+2 -2
View File
@@ -17,11 +17,11 @@
#include "lib/log/log.h"
#include "lib/log/util_bug.h"
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/dh.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/bn.h>
#include <string.h>
+2 -2
View File
@@ -23,9 +23,9 @@
#include "lib/arch/bytes.h"
DISABLE_GCC_WARNING(strict-prototypes)
DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <pk11pub.h>
ENABLE_GCC_WARNING(strict-prototypes)
ENABLE_GCC_WARNING("-Wstrict-prototypes")
/**
* Convert a digest_algorithm_t (used by tor) to a HashType (used by NSS).
+2 -2
View File
@@ -25,12 +25,12 @@
#include "lib/crypt_ops/crypto_openssl_mgt.h"
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/hmac.h>
#include <openssl/sha.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
/* Crypto digest functions */
+2 -2
View File
@@ -16,7 +16,7 @@
#include "lib/log/util_bug.h"
#include "lib/string/printf.h"
DISABLE_GCC_WARNING(strict-prototypes)
DISABLE_GCC_WARNING("-Wstrict-prototypes")
#include <nss.h>
#include <pk11func.h>
#include <ssl.h>
@@ -24,7 +24,7 @@ DISABLE_GCC_WARNING(strict-prototypes)
#include <prerror.h>
#include <prtypes.h>
#include <prinit.h>
ENABLE_GCC_WARNING(strict-prototypes)
ENABLE_GCC_WARNING("-Wstrict-prototypes")
const char *
crypto_nss_get_version_str(void)
+2 -2
View File
@@ -21,7 +21,7 @@
#include "lib/testsupport/testsupport.h"
#include "lib/thread/threads.h"
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/err.h>
#include <openssl/rsa.h>
@@ -36,7 +36,7 @@ DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/crypto.h>
#include <openssl/ssl.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
#include <string.h>
+2 -2
View File
@@ -43,10 +43,10 @@
#endif
#ifdef ENABLE_OPENSSL
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/rand.h>
#include <openssl/sha.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
#endif /* defined(ENABLE_OPENSSL) */
#ifdef ENABLE_NSS
+1 -1
View File
@@ -645,7 +645,7 @@ crypto_pk_asn1_decode(const char *str, size_t len)
return result;
}
DISABLE_GCC_WARNING(unused-parameter)
DISABLE_GCC_WARNING("-Wunused-parameter")
/** Given a crypto_pk_t <b>pk</b>, allocate a new buffer containing the Base64
* encoding of the DER representation of the private key into the
+2 -2
View File
@@ -16,7 +16,7 @@
#include "lib/log/util_bug.h"
#include "lib/fs/files.h"
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/err.h>
#include <openssl/rsa.h>
@@ -27,7 +27,7 @@ DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/bn.h>
#include <openssl/conf.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
#include "lib/log/log.h"
#include "lib/encoding/binascii.h"
+2 -2
View File
@@ -26,10 +26,10 @@
#include <stdlib.h>
#ifdef ENABLE_OPENSSL
DISABLE_GCC_WARNING(redundant-decls)
DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/err.h>
#include <openssl/crypto.h>
ENABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING("-Wredundant-decls")
#endif /* defined(ENABLE_OPENSSL) */
#include "lib/log/log.h"