1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

bignum: Use UNUSED macros

This commit is contained in:
Andreas Schneider
2018-11-30 17:49:29 +01:00
parent 109a203453
commit c0ae59e102
2 changed files with 22 additions and 20 deletions

View File

@ -343,25 +343,27 @@ int main(void) {
return 0; return 0;
}" HAVE_FALLTHROUGH_ATTRIBUTE) }" HAVE_FALLTHROUGH_ATTRIBUTE)
check_c_source_compiles(" if (NOT WIN32)
#define __unused __attribute__((unused)) check_c_source_compiles("
#define __unused __attribute__((unused))
static int do_nothing(int i __unused) static int do_nothing(int i __unused)
{ {
return 0; return 0;
}
int main(void)
{
int i;
i = do_nothing(5);
if (i > 5) {
return 1;
} }
return 0; int main(void)
}" HAVE_UNUSED_ATTRIBUTE) {
int i;
i = do_nothing(5);
if (i > 5) {
return 1;
}
return 0;
}" HAVE_UNUSED_ATTRIBUTE)
endif()
check_c_source_compiles(" check_c_source_compiles("
#include <string.h> #include <string.h>

View File

@ -88,12 +88,12 @@ bignum ssh_make_string_bn(ssh_string string){
return bn; return bn;
} }
void ssh_make_string_bn_inplace(ssh_string string, bignum bnout) { void ssh_make_string_bn_inplace(ssh_string string,
size_t len = ssh_string_len(string); UNUSED_PARAM(bignum bnout))
{
UNUSED_VAR(size_t len) = ssh_string_len(string);
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_LIBGCRYPT
/* XXX: FIXME as needed for LIBGCRYPT ECDSA codepaths. */ /* XXX: FIXME as needed for LIBGCRYPT ECDSA codepaths. */
(void) len;
(void) bnout;
#elif defined HAVE_LIBCRYPTO #elif defined HAVE_LIBCRYPTO
bignum_bin2bn(string->data, len, bnout); bignum_bin2bn(string->data, len, bnout);
#elif defined HAVE_LIBMBEDCRYPTO #elif defined HAVE_LIBMBEDCRYPTO