* tests/test-gc-rijndael.c (main): Rename local variable 'i' to 'round'.
* tests/test-rijndael.c (main): Likewise.
2023-09-04 Bruno Haible <bruno@clisp.org>
+ crypto/{gc-rijndael,rijndael} tests: Fix some gcc -Wshadow warnings.
+ * tests/test-gc-rijndael.c (main): Rename local variable 'i' to 'round'.
+ * tests/test-rijndael.c (main): Likewise.
+
threads-h tests: Fix gcc -Wold-style-declaration warning.
* tests/test-thread_local.c (value0, value1, value2, value3): Put the
'thread_local' storage class specifier before the type.
char ct[] = "\xC3\x4C\x05\x2C\xC0\xDA\x8D\x73"
"\x45\x1A\xFE\x5F\x03\xBE\x29\x7F";
gc_cipher_handle ctx;
- size_t i;
+ size_t round;
rc = gc_cipher_open (GC_AES128, GC_ECB, &ctx);
if (rc != GC_OK)
memcpy (buf, pt, 16);
- for (i = 0; i < 10000; i++)
+ for (round = 0; round < 10000; round++)
{
rc = gc_cipher_encrypt_inline (ctx, 16, buf);
if (rc != GC_OK)
return 1;
}
- for (i = 0; i < 10000; i++)
+ for (round = 0; round < 10000; round++)
{
rc = gc_cipher_decrypt_inline (ctx, 16, buf);
if (rc != GC_OK)
char ct[] = "\x66\xe9\x4b\xd4\xef\x8a\x2c\x3b"
"\x88\x4c\xfa\x59\xca\x34\x2b\x2e";
gc_cipher_handle ctx;
- size_t i;
+ size_t round;
rc = gc_cipher_open (GC_AES128, GC_CBC, &ctx);
if (rc != GC_OK)
memcpy (buf, pt, 16);
- for (i = 0; i < 10000; i++)
+ for (round = 0; round < 10000; round++)
{
rc = gc_cipher_encrypt_inline (ctx, 16, buf);
if (rc != GC_OK)
"\x00\x00\x00\x00\x00\x00\x00\x00";
char ct[] = "\xC3\x4C\x05\x2C\xC0\xDA\x8D\x73"
"\x45\x1A\xFE\x5F\x03\xBE\x29\x7F";
- size_t i;
+ size_t round;
rc = rijndaelMakeKey (&key, RIJNDAEL_DIR_ENCRYPT,
128, "00000000000000000000000000000000");
memset (in, 0, RIJNDAEL_BITSPERBLOCK / 8);
- for (i = 0; i < 10000; i++)
+ for (round = 0; round < 10000; round++)
{
rc = rijndaelBlockEncrypt (&cipher, &key, in, 128, out);
if (rc < 0)
if (rc != 0)
printf ("cipherInit failed %d\n", rc);
- for (i = 0; i < 10000; i++)
+ for (round = 0; round < 10000; round++)
{
memcpy (in, out, RIJNDAEL_BITSPERBLOCK / 8);