From 3a63c0edab842af3e84ef1cad2b4eb701eece3e1 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 11 Nov 2017 22:23:12 +0100 Subject: Resolve warnings in VC-WIN32 build, which allows to add /WX. It's argued that /WX allows to keep better focus on new code, which motivates its comeback... Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/4721) --- test/handshake_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/handshake_helper.c') diff --git a/test/handshake_helper.c b/test/handshake_helper.c index ad1b7090a6..188ec9ed96 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -350,14 +350,14 @@ static int parse_protos(const char *protos, unsigned char **out, size_t *outlen) if ((*out)[i] == ',') { if (!TEST_int_gt(i - 1, prefix)) goto err; - (*out)[prefix] = i - 1 - prefix; + (*out)[prefix] = (unsigned char)(i - 1 - prefix); prefix = i; } i++; } if (!TEST_int_gt(len, prefix)) goto err; - (*out)[prefix] = len - prefix; + (*out)[prefix] = (unsigned char)(len - prefix); return 1; err: -- cgit v1.2.3