Build fixes
authorEmilia Kasper <emilia@openssl.org>
Mon, 15 Dec 2014 15:37:13 +0000 (16:37 +0100)
committerEmilia Kasper <emilia@openssl.org>
Wed, 17 Dec 2014 13:27:49 +0000 (14:27 +0100)
Various build fixes, mostly uncovered by clang's unused-const-variable
and unused-function errors.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
crypto/ec/ec_lib.c
crypto/ec/ecp_nistp256.c
crypto/ec/ectest.c
crypto/engine/eng_dyn.c
engines/e_padlock.c

index 37990303fd2a4302ed3b342ac39edb00c1aa3da4..298a105607efa160d5603e3bea7117eb6216e4c4 100644 (file)
@@ -68,7 +68,7 @@
 
 #include "ec_lcl.h"
 
-static const char EC_version[] = "EC" OPENSSL_VERSION_PTEXT;
+const char EC_version[] = "EC" OPENSSL_VERSION_PTEXT;
 
 
 /* functions for EC_GROUP objects */
index 4bc0f5dce02212798671334e87444adaa80dd500..b884f73d31c02c39cfa953cf67195e1f23cce86e 100644 (file)
@@ -113,7 +113,6 @@ typedef u64 smallfelem[NLIMBS];
 
 /* This is the value of the prime as four 64-bit words, little-endian. */
 static const u64 kPrime[4] = { 0xfffffffffffffffful, 0xffffffff, 0, 0xffffffff00000001ul };
-static const limb bottom32bits = 0xffffffff;
 static const u64 bottom63bits = 0x7ffffffffffffffful;
 
 /* bin32_to_felem takes a little-endian byte array and converts it into felem
index d1bf980599c8ace2cd5fe06049ab9da07a75e30b..8e4154d86549cf66e84a8fb98cc3343ed3784391 100644 (file)
@@ -1366,7 +1366,7 @@ static const struct nistp_test_params nistp_tests_params[] =
                },
        };
 
-void nistp_single_test(const struct nistp_test_params *test)
+static void nistp_single_test(const struct nistp_test_params *test)
        {
        BN_CTX *ctx;
        BIGNUM *p, *a, *b, *x, *y, *n, *m, *order;
@@ -1469,7 +1469,7 @@ void nistp_single_test(const struct nistp_test_params *test)
        BN_CTX_free(ctx);
        }
 
-void nistp_tests()
+static void nistp_tests()
        {
        unsigned i;
 
index 807da7a5eb841c61f2edc9317a41a2558b5fc12a..01db4556aaa0af52d3bf32519c6ddd3b2ef17ee6 100644 (file)
@@ -114,9 +114,6 @@ static const ENGINE_CMD_DEFN dynamic_cmd_defns[] = {
                ENGINE_CMD_FLAG_NO_INPUT},
        {0, NULL, NULL, 0}
        };
-static const ENGINE_CMD_DEFN dynamic_cmd_defns_empty[] = {
-       {0, NULL, NULL, 0}
-       };
 
 /* Loading code stores state inside the ENGINE structure via the "ex_data"
  * element. We load all our state into a single structure and use that as a
index 9f7a85a8da57a0f2d6ec0ddf4b9e6fe2fe954a10..5d252f62a9ca8f95a362ad97e90c3a03aa8b89eb 100644 (file)
@@ -384,6 +384,7 @@ padlock_available(void)
 }
 
 #ifndef OPENSSL_NO_AES
+#ifndef AES_ASM
 /* Our own htonl()/ntohl() */
 static inline void
 padlock_bswapl(AES_KEY *ks)
@@ -397,6 +398,7 @@ padlock_bswapl(AES_KEY *ks)
        }
 }
 #endif
+#endif
 
 /* Force key reload from memory to the CPU microcode.
    Loading EFLAGS from the stack clears EFLAGS[30]