From ca496ee1011ceed0dda6166fe4502b520bd87c0f Mon Sep 17 00:00:00 2001 From: greybeard355113 Date: Sat, 15 Apr 2017 18:38:51 -0500 Subject: [PATCH] secp256k1zkp: Fix several warnings from implicitly declared function 'memcpy' (#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added includes for to explicitly declare 'memcpy' where needed. This message is typical of messages suppressed by declaring 'memcpy': warning: In file included from depend/secp256k1-zkp/src/secp256k1.c:14:0: warning: depend/secp256k1-zkp/src/ecmult_impl.h: In function ‘secp256k1_ecmult_context_clone’: warning: depend/secp256k1-zkp/src/ecmult_impl.h:186:9: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration] warning: memcpy(dst->pre_g, src->pre_g, size); warning: ^~~~~~ --- secp256k1zkp/depend/secp256k1-zkp/src/ecmult_gen_impl.h | 3 +++ secp256k1zkp/depend/secp256k1-zkp/src/ecmult_impl.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_gen_impl.h b/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_gen_impl.h index b63c4d866..c1e902423 100644 --- a/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_gen_impl.h +++ b/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_gen_impl.h @@ -14,6 +14,9 @@ #ifdef USE_ECMULT_STATIC_PRECOMPUTATION #include "ecmult_static_context.h" #endif + +#include + static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context *ctx) { ctx->prec = NULL; } diff --git a/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_impl.h b/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_impl.h index e6e5f4718..81ae08e10 100644 --- a/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_impl.h +++ b/secp256k1zkp/depend/secp256k1-zkp/src/ecmult_impl.h @@ -11,6 +11,8 @@ #include "scalar.h" #include "ecmult.h" +#include + /* optimal for 128-bit and 256-bit exponents. */ #define WINDOW_A 5