From 23335dadd3923e6ec135a77c3c3d19caf570678f Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Thu, 5 Jan 2017 14:14:29 -0800 Subject: [PATCH] Remove unused blake2 function to avoid undefined references Compilers are not required to elide static functions which are unused. Some compilers, such as Solaris Studio, always emits the function, even if the function does not get called within the translation unit. This becomes problematic when a static inline function calls a non-existent function; thus, resulting in (dynamic or static) link time errors. Given that 'blake2' is never referenced nor called, remove the definition of this function to increase portability for non-Linux toolchains. Signed-off-by: Eric N. Vander Weele --- Modules/_blake2/impl/blake2.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Modules/_blake2/impl/blake2.h b/Modules/_blake2/impl/blake2.h index 1a9fdf4302..aa42a6b1df 100644 --- a/Modules/_blake2/impl/blake2.h +++ b/Modules/_blake2/impl/blake2.h @@ -148,11 +148,6 @@ extern "C" { int blake2sp( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen ); int blake2bp( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen ); - static inline int blake2( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen ) - { - return blake2b( out, in, key, outlen, inlen, keylen ); - } - #if defined(__cplusplus) } #endif -- 2.11.0