diff options
author | Werner Koch <wk@gnupg.org> | 2015-09-04 12:39:56 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-09-04 12:44:09 +0200 |
commit | e97c62a4a687b56d00a2d0a63e072a977f8eb81c (patch) | |
tree | 556069864fa6b38e6097486ffbabf05a8afddff8 /tests | |
parent | e2785a2268702312529521df3bd2f4e6b43cea3a (diff) | |
download | libgcrypt-e97c62a4a687b56d00a2d0a63e072a977f8eb81c.tar.gz |
w32: Avoid a few compiler warnings.
* cipher/cipher-selftest.c (_gcry_selftest_helper_cbc)
(_gcry_selftest_helper_cfb, _gcry_selftest_helper_ctr): Mark variable
as unused.
* random/rndw32.c (slow_gatherer): Avoid signed pointer mismatch
warning.
* src/secmem.c (init_pool): Avoid unused variable warning.
* tests/random.c (writen, readn): Include on if needed.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fipsdrv.c | 4 | ||||
-rw-r--r-- | tests/gchash.c | 2 | ||||
-rw-r--r-- | tests/random.c | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/tests/fipsdrv.c b/tests/fipsdrv.c index eef2ddd1..b3da2a30 100644 --- a/tests/fipsdrv.c +++ b/tests/fipsdrv.c @@ -2358,14 +2358,14 @@ main (int argc, char **argv) { if (!(++count % 1000)) fprintf (stderr, PGM ": %lu random bytes so far\n", - (unsigned long int)count * sizeof buffer); + (unsigned long int)(count * sizeof buffer)); } } while (loop_mode); if (progress) fprintf (stderr, PGM ": %lu random bytes\n", - (unsigned long int)count * sizeof buffer); + (unsigned long int)(count * sizeof buffer)); deinit_external_rng_test (context); } diff --git a/tests/gchash.c b/tests/gchash.c index 7a2aad68..7ff99e0c 100644 --- a/tests/gchash.c +++ b/tests/gchash.c @@ -109,7 +109,7 @@ main (int argc, char **argv) h = gcry_md_read(hd, 0); for (i = 0; i < gcry_md_get_algo_dlen (algo); i++) - printf("%02hhx", h[i]); + printf("%02x", h[i]); printf(" %s\n", *argv); gcry_md_reset(hd); diff --git a/tests/random.c b/tests/random.c index 10bf6467..d7a624ad 100644 --- a/tests/random.c +++ b/tests/random.c @@ -87,7 +87,7 @@ progress_cb (void *cb_data, const char *what, int printchar, } - +#ifndef HAVE_W32_SYSTEM static int writen (int fd, const void *buf, size_t nbytes) { @@ -110,7 +110,10 @@ writen (int fd, const void *buf, size_t nbytes) return 0; } +#endif /*!HAVE_W32_SYSTEM*/ + +#ifndef HAVE_W32_SYSTEM static int readn (int fd, void *buf, size_t buflen, size_t *ret_nread) { @@ -136,7 +139,7 @@ readn (int fd, void *buf, size_t buflen, size_t *ret_nread) *ret_nread = buflen - nleft; return 0; } - +#endif /*!HAVE_W32_SYSTEM*/ /* Check that forking won't return the same random. */ |