From b3cdb6d8920e96503bcac9e5776de792d054be7b Mon Sep 17 00:00:00 2001 From: beck Date: Wed, 23 Apr 2014 05:13:57 +0000 Subject: [PATCH] Make libssl and libcrypto compile with -Werror ok miod@ --- lib/libcrypto/crypto/Makefile | 4 ++-- lib/libcrypto/engine/hw_cryptodev.c | 2 +- lib/libssl/d1_srvr.c | 2 +- lib/libssl/s3_srvr.c | 2 +- lib/libssl/src/crypto/engine/hw_cryptodev.c | 2 +- lib/libssl/src/ssl/d1_srvr.c | 2 +- lib/libssl/src/ssl/s3_srvr.c | 2 +- lib/libssl/ssl/Makefile | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libcrypto/crypto/Makefile b/lib/libcrypto/crypto/Makefile index f46702b7ebc..7259e461cd6 100644 --- a/lib/libcrypto/crypto/Makefile +++ b/lib/libcrypto/crypto/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.26 2014/04/18 19:41:21 miod Exp $ +# $OpenBSD: Makefile,v 1.27 2014/04/23 05:13:57 beck Exp $ LIB= crypto SSL_SRC= ${.CURDIR}/../../libssl/src LCRYPTO_SRC= ${SSL_SRC}/crypto -CFLAGS+= -Wall +CFLAGS+= -Wall -Werror .include # for 'NOPIC' definition .if !defined(NOPIC) diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c index bc953872dd0..190dcc4f753 100644 --- a/lib/libcrypto/engine/hw_cryptodev.c +++ b/lib/libcrypto/engine/hw_cryptodev.c @@ -654,7 +654,7 @@ xcrypt_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *ivs = DOALIGN(ivs_store); void *iiv, *iv = NULL, *ivp = NULL; const void *usein = in; - void *useout = out, *spare; + void *useout = out, *spare = NULL; int cws[4 + 3], *cw = DOALIGN(cws); if (!inl) diff --git a/lib/libssl/d1_srvr.c b/lib/libssl/d1_srvr.c index 8fa75819bb1..9995278a264 100644 --- a/lib/libssl/d1_srvr.c +++ b/lib/libssl/d1_srvr.c @@ -1016,7 +1016,7 @@ dtls1_send_server_key_exchange(SSL *s) #endif #ifndef OPENSSL_NO_PSK - size_t pskhintlen; + size_t pskhintlen = 0; #endif EVP_PKEY *pkey; unsigned char *p, *d; diff --git a/lib/libssl/s3_srvr.c b/lib/libssl/s3_srvr.c index ea3137c0743..f3edcc2efb6 100644 --- a/lib/libssl/s3_srvr.c +++ b/lib/libssl/s3_srvr.c @@ -1552,7 +1552,7 @@ ssl3_send_server_key_exchange(SSL *s) #endif #ifndef OPENSSL_NO_PSK - size_t pskhintlen; + size_t pskhintlen = 0; #endif EVP_PKEY *pkey; const EVP_MD *md = NULL; diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c index bc953872dd0..190dcc4f753 100644 --- a/lib/libssl/src/crypto/engine/hw_cryptodev.c +++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c @@ -654,7 +654,7 @@ xcrypt_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *ivs = DOALIGN(ivs_store); void *iiv, *iv = NULL, *ivp = NULL; const void *usein = in; - void *useout = out, *spare; + void *useout = out, *spare = NULL; int cws[4 + 3], *cw = DOALIGN(cws); if (!inl) diff --git a/lib/libssl/src/ssl/d1_srvr.c b/lib/libssl/src/ssl/d1_srvr.c index 8fa75819bb1..9995278a264 100644 --- a/lib/libssl/src/ssl/d1_srvr.c +++ b/lib/libssl/src/ssl/d1_srvr.c @@ -1016,7 +1016,7 @@ dtls1_send_server_key_exchange(SSL *s) #endif #ifndef OPENSSL_NO_PSK - size_t pskhintlen; + size_t pskhintlen = 0; #endif EVP_PKEY *pkey; unsigned char *p, *d; diff --git a/lib/libssl/src/ssl/s3_srvr.c b/lib/libssl/src/ssl/s3_srvr.c index ea3137c0743..f3edcc2efb6 100644 --- a/lib/libssl/src/ssl/s3_srvr.c +++ b/lib/libssl/src/ssl/s3_srvr.c @@ -1552,7 +1552,7 @@ ssl3_send_server_key_exchange(SSL *s) #endif #ifndef OPENSSL_NO_PSK - size_t pskhintlen; + size_t pskhintlen = 0; #endif EVP_PKEY *pkey; const EVP_MD *md = NULL; diff --git a/lib/libssl/ssl/Makefile b/lib/libssl/ssl/Makefile index 2deb1b6e001..64dd10bb6d1 100644 --- a/lib/libssl/ssl/Makefile +++ b/lib/libssl/ssl/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.39 2014/04/17 20:44:04 tedu Exp $ +# $OpenBSD: Makefile,v 1.40 2014/04/23 05:13:57 beck Exp $ LIB= ssl SSL_SRC= ${.CURDIR}/../../libssl/src LSSL_SRC= ${SSL_SRC}/ssl -CFLAGS+= -Wall +CFLAGS+= -Wall -Werror CFLAGS+= -DTERMIOS -DANSI_SOURCE CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 CFLAGS+= -I${SSL_SRC} -- 2.20.1