Commit 4c3376ec authored by Rich Salz's avatar Rich Salz
Browse files

Add -Wundef to strict-warnings



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: default avatarAndy Polyakov <appro@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2709)
parent 6db2b149
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
        . " -Wshadow"
        . " -Wformat"
        . " -Wtype-limits"
        . " -Wundef"
        . " -Werror"
        ;

@@ -143,6 +144,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
+2 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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>
+1 −1
Original line number Diff line number Diff line
@@ -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>
+1 −1
Original line number Diff line number Diff line
@@ -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>
Loading