From b402de8b9c4a9f269faf03ca952b1eb68a1f33c8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 18 Apr 2013 14:40:43 +0200 Subject: Avoid compiler warning due to the global symbol setkey. * cipher/cipher-selftest.c (_gcry_selftest_helper_cbc_128) (_gcry_selftest_helper_ctr_128): Rename setkey to setkey_func. -- setkey is a POSIX.1 function defined in stdlib. --- cipher/cipher-selftest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cipher/cipher-selftest.c') diff --git a/cipher/cipher-selftest.c b/cipher/cipher-selftest.c index 50c77520..439f3aee 100644 --- a/cipher/cipher-selftest.c +++ b/cipher/cipher-selftest.c @@ -47,7 +47,8 @@ /* Run the self-tests for -CBC-128, tests bulk CBC decryption. Returns NULL on success. */ const char * -_gcry_selftest_helper_cbc_128 (const char *cipher, gcry_cipher_setkey_t setkey, +_gcry_selftest_helper_cbc_128 (const char *cipher, + gcry_cipher_setkey_t setkey_func, gcry_cipher_encrypt_t encrypt_one, gcry_cipher_bulk_cbc_dec_t bulk_cbc_dec, const int nblocks, const int blocksize, @@ -81,7 +82,7 @@ _gcry_selftest_helper_cbc_128 (const char *cipher, gcry_cipher_setkey_t setkey, ciphertext = plaintext2 + nblocks * blocksize; /* Initialize ctx */ - setkey (ctx, key, sizeof(key)); + setkey_func (ctx, key, sizeof(key)); /* Test single block code path */ memset (iv, 0x4e, blocksize); @@ -162,7 +163,8 @@ _gcry_selftest_helper_cbc_128 (const char *cipher, gcry_cipher_setkey_t setkey, /* Run the self-tests for -CTR-128, tests IV increment of bulk CTR encryption. Returns NULL on success. */ const char * -_gcry_selftest_helper_ctr_128 (const char *cipher, gcry_cipher_setkey_t setkey, +_gcry_selftest_helper_ctr_128 (const char *cipher, + gcry_cipher_setkey_t setkey_func, gcry_cipher_encrypt_t encrypt_one, gcry_cipher_bulk_ctr_enc_t bulk_ctr_enc, const int nblocks, const int blocksize, @@ -196,7 +198,7 @@ _gcry_selftest_helper_ctr_128 (const char *cipher, gcry_cipher_setkey_t setkey, ciphertext = plaintext2 + nblocks * blocksize; /* Initialize ctx */ - setkey (ctx, key, sizeof(key)); + setkey_func (ctx, key, sizeof(key)); /* Test single block code path */ memset (iv, 0xff, blocksize); -- cgit v1.2.1