diff options
author | Kyle Altendorf <sda@fstab.net> | 2019-09-09 16:10:18 -0400 |
---|---|---|
committer | Kyle Altendorf <sda@fstab.net> | 2019-09-09 16:10:20 -0400 |
commit | baaa8edbfb86d093d548b990193973388c809954 (patch) | |
tree | 150b70e02c55ccb91177e5531596109f9a70eaa0 /test.c | |
parent | d/experimental (diff) | |
download | siphash-baaa8edbfb86d093d548b990193973388c809954.tar.gz siphash-baaa8edbfb86d093d548b990193973388c809954.tar.xz |
Avoid warnings about unused variable fails
test.c: In function ‘main’:
test.c:49:9: warning: variable ‘fails’ set but not used [-Wunused-but-set-variable]
int fails = 0;
^~~~~
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -46,7 +46,9 @@ size_t lengths[4] = {8, 16, 4, 8}; int main() { uint8_t in[64], out[16], k[16]; int i; +#ifndef GETVECTORS int fails = 0; +#endif for (i = 0; i < 16; ++i) k[i] = i; @@ -88,7 +90,9 @@ int main() { if (memcmp(out, v + (i * len), len)) { printf("fail for %d bytes\n", i); +#ifndef GETVECTORS fails++; +#endif } #endif } @@ -98,8 +102,9 @@ int main() { #else if (!fails) printf("OK\n"); -#endif + fails = 0; +#endif } return 0; |