mirror of https://github.com/openssl/openssl.git
Add -Wundef to --strict-warnings options.
Avoid a -Wundef warning in refcount.h Avoid a -Wundef warning in o_str.c Avoid a -Wundef warning in testutil.h Include internal/cryptlib.h before openssl/stack.h to avoid use of undefined symbol OPENSSL_API_COMPAT. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2712)
This commit is contained in:
parent
75c13e7830
commit
01b76c2c5d
|
@ -124,6 +124,7 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
|
||||||
. " -Wshadow"
|
. " -Wshadow"
|
||||||
. " -Wformat"
|
. " -Wformat"
|
||||||
. " -Wtype-limits"
|
. " -Wtype-limits"
|
||||||
|
. " -Wundef"
|
||||||
. " -Werror"
|
. " -Werror"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -147,6 +148,7 @@ my $clang_devteam_warn = ""
|
||||||
. " -Wconditional-uninitialized"
|
. " -Wconditional-uninitialized"
|
||||||
. " -Wincompatible-pointer-types-discards-qualifiers"
|
. " -Wincompatible-pointer-types-discards-qualifiers"
|
||||||
. " -Wmissing-variable-declarations"
|
. " -Wmissing-variable-declarations"
|
||||||
|
. " -Wundef"
|
||||||
;
|
;
|
||||||
|
|
||||||
# This adds backtrace information to the memory leak info. Is only used
|
# This adds backtrace information to the memory leak info. Is only used
|
||||||
|
|
|
@ -227,7 +227,8 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen)
|
||||||
return !strerror_s(buf, buflen, errnum);
|
return !strerror_s(buf, buflen, errnum);
|
||||||
#elif defined(_GNU_SOURCE)
|
#elif defined(_GNU_SOURCE)
|
||||||
return strerror_r(errnum, buf, buflen) != NULL;
|
return strerror_r(errnum, buf, buflen) != NULL;
|
||||||
#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
|
#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
|
||||||
|
(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
|
||||||
/*
|
/*
|
||||||
* We can use "real" strerror_r. The OpenSSL version differs in that it
|
* We can use "real" strerror_r. The OpenSSL version differs in that it
|
||||||
* gives 1 on success and 0 on failure for consistency with other OpenSSL
|
* gives 1 on success and 0 on failure for consistency with other OpenSSL
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/stack.h>
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
#include <openssl/stack.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/stack.h>
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
#include <openssl/stack.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/stack.h>
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
#include <openssl/stack.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/stack.h>
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
#include <openssl/stack.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/stack.h>
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
#include <openssl/stack.h>
|
||||||
#include <openssl/buffer.h>
|
#include <openssl/buffer.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
|
@ -9,12 +9,14 @@
|
||||||
#ifndef HEADER_INTERNAL_REFCOUNT_H
|
#ifndef HEADER_INTERNAL_REFCOUNT_H
|
||||||
# define HEADER_INTERNAL_REFCOUNT_H
|
# define HEADER_INTERNAL_REFCOUNT_H
|
||||||
|
|
||||||
# if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
|
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
|
||||||
|
&& !defined(__STDC_NO_ATOMICS__)
|
||||||
# include <stdatomic.h>
|
# include <stdatomic.h>
|
||||||
# define HAVE_C11_ATOMICS
|
# define HAVE_C11_ATOMICS
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(HAVE_C11_ATOMICS) && ATOMIC_INT_LOCK_FREE > 0
|
# if defined(HAVE_C11_ATOMICS) && defined(ATOMIC_INT_LOCK_FREE) \
|
||||||
|
&& ATOMIC_INT_LOCK_FREE > 0
|
||||||
|
|
||||||
# define HAVE_ATOMICS 1
|
# define HAVE_ATOMICS 1
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
* TEST_CASE_NAME is defined as the name of the test case function where
|
* TEST_CASE_NAME is defined as the name of the test case function where
|
||||||
* possible; otherwise we get by with the file name and line number.
|
* possible; otherwise we get by with the file name and line number.
|
||||||
*/
|
*/
|
||||||
# if __STDC_VERSION__ < 199901L
|
# if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
|
||||||
# if defined(_MSC_VER)
|
# if defined(_MSC_VER)
|
||||||
# define TEST_CASE_NAME __FUNCTION__
|
# define TEST_CASE_NAME __FUNCTION__
|
||||||
# else
|
# else
|
||||||
|
|
Loading…
Reference in New Issue