]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix warnings exposed by clang-3.8
authorEmilia Kasper <emilia@openssl.org>
Fri, 8 Apr 2016 14:19:00 +0000 (16:19 +0200)
committerEmilia Kasper <emilia@openssl.org>
Sat, 9 Apr 2016 23:50:32 +0000 (01:50 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/s_cb.c
test/ct_test.c

index 49f3acd65f81200a65373db1e6f7dfe8f122a0cd..abcbad4738299f35dc04c0e7cfc3e7de54f7cd34 100644 (file)
@@ -507,12 +507,12 @@ long bio_dump_callback(BIO *bio, int cmd, const char *argp,
 
     if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
         BIO_printf(out, "read from %p [%p] (%lu bytes => %ld (0x%lX))\n",
-                   (void *)bio, argp, (unsigned long)argi, ret, ret);
+                   (void *)bio, (void *)argp, (unsigned long)argi, ret, ret);
         BIO_dump(out, argp, (int)ret);
         return (ret);
     } else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
         BIO_printf(out, "write to %p [%p] (%lu bytes => %ld (0x%lX))\n",
-                   (void *)bio, argp, (unsigned long)argi, ret, ret);
+                   (void *)bio, (void *)argp, (unsigned long)argi, ret, ret);
         BIO_dump(out, argp, (int)ret);
     }
     return (ret);
index bdd5b84806e0be251b2b783f7cba6e2a4b8bc202..8175d16c92453cf3c34d806a815011269ebe2aba 100644 (file)
@@ -101,7 +101,11 @@ static CT_TEST_FIXTURE set_up(const char *const test_case_name)
 {
     CT_TEST_FIXTURE fixture;
     int setup_ok = 1;
-    CTLOG_STORE *ctlog_store = CTLOG_STORE_new();
+    CTLOG_STORE *ctlog_store;
+
+    memset(&fixture, 0, sizeof(fixture));
+
+    ctlog_store = CTLOG_STORE_new();
 
     if (ctlog_store == NULL) {
         setup_ok = 0;
@@ -115,7 +119,6 @@ static CT_TEST_FIXTURE set_up(const char *const test_case_name)
         goto end;
     }
 
-    memset(&fixture, 0, sizeof(fixture));
     fixture.test_case_name = test_case_name;
     fixture.ctlog_store = ctlog_store;