stop warning when compiling with no-comp
authorDr. Stephen Henson <steve@openssl.org>
Sun, 30 Dec 2012 01:12:19 +0000 (01:12 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 30 Dec 2012 01:12:19 +0000 (01:12 +0000)
ssl/s3_srvr.c
ssl/ssltest.c

index ed7d34f724c2efe509b86f4d4f10c03e1f90c087..d8bce55f4241cfc01531eb795877c1e7d4dca301 100644 (file)
@@ -941,9 +941,10 @@ int ssl3_get_client_hello(SSL *s)
        unsigned int cookie_len;
        long n;
        unsigned long id;
-       unsigned char *p,*d,*q;
+       unsigned char *p,*d;
        SSL_CIPHER *c;
 #ifndef OPENSSL_NO_COMP
+       unsigned char *q;
        SSL_COMP *comp=NULL;
 #endif
        STACK_OF(SSL_CIPHER) *ciphers=NULL;
@@ -1179,7 +1180,9 @@ int ssl3_get_client_hello(SSL *s)
                SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_LENGTH_MISMATCH);
                goto f_err;
                }
+#ifndef OPENSSL_NO_COMP
        q=p;
+#endif
        for (j=0; j<i; j++)
                {
                if (p[j] == 0) break;
index 1f557dd9a1a31ceafe04dc077ad4371acb23d4ef..3c010409abeb5e3cd8d5908c867a074eb86b46da 100644 (file)
@@ -595,8 +595,8 @@ int main(int argc, char *argv[])
        int no_psk = 0;
        int print_time = 0;
        clock_t s_time = 0, c_time = 0;
-       int comp = 0;
 #ifndef OPENSSL_NO_COMP
+       int comp = 0;
        COMP_METHOD *cm = NULL;
        STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
 #endif
@@ -795,6 +795,7 @@ int main(int argc, char *argv[])
                        {
                        print_time = 1;
                        }
+#ifndef OPENSSL_NO_COMP
                else if (strcmp(*argv,"-zlib") == 0)
                        {
                        comp = COMP_ZLIB;
@@ -803,6 +804,7 @@ int main(int argc, char *argv[])
                        {
                        comp = COMP_RLE;
                        }
+#endif
                else if (strcmp(*argv,"-named_curve") == 0)
                        {
                        if (--argc < 1) goto bad;