diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2021-05-22 16:48:00 +0200 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2021-05-22 16:48:19 +0200 |
commit | 170896a76a172f38b980bbbe5010dd5ea65e3460 (patch) | |
tree | cbe61e91d12f330196f2e464b3954d9032e78a0b /fuzz | |
parent | d4431a0b977595e1373c035765a86c38451715cf (diff) | |
download | wget-170896a76a172f38b980bbbe5010dd5ea65e3460.tar.gz |
* fuzz/wget_read_hunk_fuzzer.c: Add explicit cast for C++ compilation
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/wget_read_hunk_fuzzer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fuzz/wget_read_hunk_fuzzer.c b/fuzz/wget_read_hunk_fuzzer.c index a27b91dc..da462980 100644 --- a/fuzz/wget_read_hunk_fuzzer.c +++ b/fuzz/wget_read_hunk_fuzzer.c @@ -74,14 +74,15 @@ struct my_context { char peekbuf[512]; }; -static int my_peek (int fd _GL_UNUSED, char *buf, int bufsize, void *arg) +static int my_peek (int fd _GL_UNUSED, char *buf, int bufsize, void *arg, double d) { + (void) d; if (g_read < g_size) { struct my_context *ctx = (struct my_context *) arg; int n = rand() % (g_size - g_read); if (n > bufsize) n = bufsize; - if (n > sizeof(ctx->peekbuf)) + if (n > (int) sizeof(ctx->peekbuf)) n = sizeof(ctx->peekbuf); memcpy(buf, g_data + g_read, n); memcpy(ctx->peekbuf, g_data + g_read, n); @@ -91,8 +92,9 @@ static int my_peek (int fd _GL_UNUSED, char *buf, int bufsize, void *arg) } return 0; } -static int my_read (int fd _GL_UNUSED, char *buf, int bufsize, void *arg) +static int my_read (int fd _GL_UNUSED, char *buf, int bufsize, void *arg, double d) { + (void) d; struct my_context *ctx = (struct my_context *) arg; if (ctx->peeklen) { |