From 3e408d59c4f0071f140867ba7cc00ba44ad264b3 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 10 Jul 2019 01:09:50 +0200 Subject: [PATCH] Fixes warnings from MSVC --- programs/fuzz/common.c | 5 ++++- programs/fuzz/onefile.c | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/fuzz/common.c b/programs/fuzz/common.c index a9d3d3b86..169b4804f 100644 --- a/programs/fuzz/common.c +++ b/programs/fuzz/common.c @@ -26,7 +26,10 @@ int dummy_send( void *ctx, const unsigned char *buf, size_t len ) (void) buf; //pretends we wrote everything ok - return( len ); + if (len > INT_MAX) { + return -1; + } + return int( len ); } int fuzz_recv( void *ctx, unsigned char *buf, size_t len ) diff --git a/programs/fuzz/onefile.c b/programs/fuzz/onefile.c index 45c32829f..c5361b310 100644 --- a/programs/fuzz/onefile.c +++ b/programs/fuzz/onefile.c @@ -1,5 +1,4 @@ #include -#include #include #include