diff options
-rwxr-xr-x | Configure | 2 | ||||
-rw-r--r-- | crypto/o_str.c | 3 | ||||
-rw-r--r-- | crypto/x509/x509_att.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509_ext.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509_v3.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509name.c | 2 | ||||
-rw-r--r-- | crypto/x509/x_all.c | 2 | ||||
-rw-r--r-- | include/internal/refcount.h | 6 | ||||
-rw-r--r-- | test/testutil.h | 2 |
9 files changed, 14 insertions, 9 deletions
@@ -124,6 +124,7 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED" . " -Wshadow" . " -Wformat" . " -Wtype-limits" + . " -Wundef" . " -Werror" ; @@ -147,6 +148,7 @@ my $clang_devteam_warn = "" . " -Wconditional-uninitialized" . " -Wincompatible-pointer-types-discards-qualifiers" . " -Wmissing-variable-declarations" + . " -Wundef" ; # This adds backtrace information to the memory leak info. Is only used diff --git a/crypto/o_str.c b/crypto/o_str.c index beabec0ddc..d8516c27bb 100644 --- a/crypto/o_str.c +++ b/crypto/o_str.c @@ -227,7 +227,8 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen) return !strerror_s(buf, buflen, errnum); #elif defined(_GNU_SOURCE) 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 * gives 1 on success and 0 on failure for consistency with other OpenSSL diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c index a91f9829b5..3876a83323 100644 --- a/crypto/x509/x509_att.c +++ b/crypto/x509/x509_att.c @@ -8,8 +8,8 @@ */ #include <stdio.h> -#include <openssl/stack.h> #include "internal/cryptlib.h" +#include <openssl/stack.h> #include <openssl/asn1.h> #include <openssl/objects.h> #include <openssl/evp.h> diff --git a/crypto/x509/x509_ext.c b/crypto/x509/x509_ext.c index 3bbb0a6b6c..3c59079852 100644 --- a/crypto/x509/x509_ext.c +++ b/crypto/x509/x509_ext.c @@ -8,8 +8,8 @@ */ #include <stdio.h> -#include <openssl/stack.h> #include "internal/cryptlib.h" +#include <openssl/stack.h> #include <openssl/asn1.h> #include <openssl/objects.h> #include <openssl/evp.h> diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c index ad126efeba..213e762f98 100644 --- a/crypto/x509/x509_v3.c +++ b/crypto/x509/x509_v3.c @@ -8,8 +8,8 @@ */ #include <stdio.h> -#include <openssl/stack.h> #include "internal/cryptlib.h" +#include <openssl/stack.h> #include <openssl/asn1.h> #include <openssl/objects.h> #include <openssl/evp.h> diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c index ab53794741..2935b17af9 100644 --- a/crypto/x509/x509name.c +++ b/crypto/x509/x509name.c @@ -8,8 +8,8 @@ */ #include <stdio.h> -#include <openssl/stack.h> #include "internal/cryptlib.h" +#include <openssl/stack.h> #include <openssl/asn1.h> #include <openssl/objects.h> #include <openssl/evp.h> diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c index 124dd2d2f8..42bd161185 100644 --- a/crypto/x509/x_all.c +++ b/crypto/x509/x_all.c @@ -8,8 +8,8 @@ */ #include <stdio.h> -#include <openssl/stack.h> #include "internal/cryptlib.h" +#include <openssl/stack.h> #include <openssl/buffer.h> #include <openssl/asn1.h> #include <openssl/evp.h> diff --git a/include/internal/refcount.h b/include/internal/refcount.h index b83e05c4cc..591561ffee 100644 --- a/include/internal/refcount.h +++ b/include/internal/refcount.h @@ -9,12 +9,14 @@ #ifndef 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> # define HAVE_C11_ATOMICS # 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 diff --git a/test/testutil.h b/test/testutil.h index 39b6d0e6f1..cc2f15306c 100644 --- a/test/testutil.h +++ b/test/testutil.h @@ -107,7 +107,7 @@ * 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. */ -# if __STDC_VERSION__ < 199901L +# if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L # if defined(_MSC_VER) # define TEST_CASE_NAME __FUNCTION__ # else |