From 4c0587bf16980b4b3ca4dfe8c2d771185469ed53 Mon Sep 17 00:00:00 2001 From: Payne Date: Fri, 21 Sep 2018 11:19:44 +0800 Subject: [PATCH] crypto/secp256k1: remove useless code `(void)data;` may cause link error on Windows. LOG: ``` \Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 \Temp\go-link-676803019\000003.o: In function `default_error_callback_fn': \go\src\github.com\ethereum\go-ethereum\crypto\secp256k1/./libsecp256k1/src/secp256k1.c:41: undefined reference to `__getreent' \Temp\go-link-676803019\000003.o: In function `default_illegal_callback_fn': \go\src\github.com\ethereum\go-ethereum\crypto\secp256k1/./libsecp256k1/src/secp256k1.c:30: undefined reference to `__getreent' collect2.exe: error: ld returned 1 exit status ``` --- crypto/secp256k1/libsecp256k1/src/secp256k1.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/crypto/secp256k1/libsecp256k1/src/secp256k1.c b/crypto/secp256k1/libsecp256k1/src/secp256k1.c index fb8b882faa..7d637bfad1 100755 --- a/crypto/secp256k1/libsecp256k1/src/secp256k1.c +++ b/crypto/secp256k1/libsecp256k1/src/secp256k1.c @@ -26,7 +26,6 @@ } while(0) static void default_illegal_callback_fn(const char* str, void* data) { - (void)data; fprintf(stderr, "[libsecp256k1] illegal argument: %s\n", str); abort(); } @@ -37,7 +36,6 @@ static const secp256k1_callback default_illegal_callback = { }; static void default_error_callback_fn(const char* str, void* data) { - (void)data; fprintf(stderr, "[libsecp256k1] internal consistency check failed: %s\n", str); abort(); }