From 6a25b42efba8e1ca4e058ade0402ba35342fc950 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sat, 12 Jan 2019 07:49:49 +0900 Subject: [PATCH] fix worning --- src/tls.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tls.c b/src/tls.c index fd6591d08..0ee64c9d6 100644 --- a/src/tls.c +++ b/src/tls.c @@ -7430,7 +7430,7 @@ word16 TLSX_PreSharedKey_GetSizeBinders(PreSharedKey* list, byte msgType) word16 len; if (msgType != client_hello) - return SANITY_MSG_E; + return (word16)SANITY_MSG_E; /* Length of all binders. */ len = OPAQUE16_LEN; @@ -7459,7 +7459,7 @@ word16 TLSX_PreSharedKey_WriteBinders(PreSharedKey* list, byte* output, word16 len; if (msgType != client_hello) - return SANITY_MSG_E; + return (word16)SANITY_MSG_E; /* Skip length of all binders. */ lenIdx = idx; @@ -7535,7 +7535,7 @@ static word16 TLSX_PreSharedKey_Write(PreSharedKey* list, byte* output, for (i=0; list != NULL && !list->chosen; i++) list = list->next; if (list == NULL) - return BUILD_MSG_ERROR; + return (word16)BUILD_MSG_ERROR; /* The index of the identity chosen by the server from the list supplied * by the client. @@ -7853,7 +7853,7 @@ static word16 TLSX_PskKeModes_GetSize(byte modes, byte msgType) return len; } - return SANITY_MSG_E; + return (word16)SANITY_MSG_E; } /* Writes the PSK KE modes extension into the output buffer. @@ -7882,7 +7882,7 @@ static word16 TLSX_PskKeModes_Write(byte modes, byte* output, byte msgType) return idx; } - return SANITY_MSG_E; + return (word16)SANITY_MSG_E; } /* Parse the PSK KE modes extension.