Fix warnings.
authorBen Laurie <ben@openssl.org>
Fri, 2 Dec 2011 14:39:41 +0000 (14:39 +0000)
committerBen Laurie <ben@openssl.org>
Fri, 2 Dec 2011 14:39:41 +0000 (14:39 +0000)
Configure
apps/s_socket.c
crypto/bn/bn_gf2m.c
crypto/evp/p5_crpt2.c
ssl/t1_enc.c

index 23f52ff39aa696978b2225239ce51b267f878f69..ae821374fd569a1a7c27a87aeb86b7379f8ca523 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -170,7 +170,7 @@ my %table=(
 "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
 "debug-ben-debug",     "gcc44:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O2 -pipe::(unknown)::::::",
-"debug-ben-macos",     "cc:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch i386 -O3 -DL_ENDIAN -g3 -pipe::(unknown)::::::",
+"debug-ben-macos",     "cc:$gcc_devteam_warn -arch i386 -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::-Wl,-search_paths_first::::",
 "debug-ben-macos-gcc46",       "gcc-mp-4.6:$gcc_devteam_warn -Wconversion -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::::::",
 "debug-ben-no-opt",    "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::",
 "debug-ben-strict",    "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
index c08544a13cbb5413f6eefd8718f3def000c38f5b..380efdb1b9762d28e8bc9f32fe0e4d1c76470435 100644 (file)
@@ -238,11 +238,10 @@ int init_client(int *sock, char *host, int port, int type)
        {
        unsigned char ip[4];
 
+       memset(ip, '\0', sizeof ip);
        if (!host_ip(host,&(ip[0])))
-               {
-               return(0);
-               }
-       return(init_client_ip(sock,ip,port,type));
+               return 0;
+       return init_client_ip(sock,ip,port,type);
        }
 
 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
index ffe1b096ba841689c784153d1a36104fcec3e568..08ab9fd22743578607119fa53fcb45c08b97fe5b 100644 (file)
@@ -522,7 +522,7 @@ err:
  */
 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
        {
-       BIGNUM *b, *c, *u, *v, *tmp;
+       BIGNUM *b, *c = NULL, *u = NULL, *v = NULL, *tmp;
        int ret = 0;
 
        bn_check_top(a);
index 176e93eabcc3e183c238de48d6139f6dbe7b19ee..975d004df4732d1eefa091cc64b76f1b2ef2a984 100644 (file)
@@ -235,7 +235,7 @@ int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
        const unsigned char *pbuf;
        int saltlen, iter, plen;
        int rv = 0;
-       unsigned int keylen;
+       unsigned int keylen = 0;
        int prf_nid, hmac_md_nid;
        PBKDF2PARAM *kdf = NULL;
        const EVP_MD *prfmd;
index 1c6fe5d82ae92dbf574b4b2ab10666245bab3685..53341eeb346fd9b43644b72e327bc69e8caafbc3 100644 (file)
@@ -1124,7 +1124,7 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, unsigned int olen,
          unsigned int contextlen, int use_context)
        {
        unsigned char *buff;
-       unsigned char *val;
+       unsigned char *val = NULL;
        unsigned int vallen, currentvalpos, rv;
 
 #ifdef KSSL_DEBUG