fix worning

This commit is contained in:
Takashi Kojo
2019-01-12 07:49:49 +09:00
parent 50598dcbac
commit 6a25b42efb

View File

@@ -7430,7 +7430,7 @@ word16 TLSX_PreSharedKey_GetSizeBinders(PreSharedKey* list, byte msgType)
word16 len; word16 len;
if (msgType != client_hello) if (msgType != client_hello)
return SANITY_MSG_E; return (word16)SANITY_MSG_E;
/* Length of all binders. */ /* Length of all binders. */
len = OPAQUE16_LEN; len = OPAQUE16_LEN;
@@ -7459,7 +7459,7 @@ word16 TLSX_PreSharedKey_WriteBinders(PreSharedKey* list, byte* output,
word16 len; word16 len;
if (msgType != client_hello) if (msgType != client_hello)
return SANITY_MSG_E; return (word16)SANITY_MSG_E;
/* Skip length of all binders. */ /* Skip length of all binders. */
lenIdx = idx; lenIdx = idx;
@@ -7535,7 +7535,7 @@ static word16 TLSX_PreSharedKey_Write(PreSharedKey* list, byte* output,
for (i=0; list != NULL && !list->chosen; i++) for (i=0; list != NULL && !list->chosen; i++)
list = list->next; list = list->next;
if (list == NULL) 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 /* The index of the identity chosen by the server from the list supplied
* by the client. * by the client.
@@ -7853,7 +7853,7 @@ static word16 TLSX_PskKeModes_GetSize(byte modes, byte msgType)
return len; return len;
} }
return SANITY_MSG_E; return (word16)SANITY_MSG_E;
} }
/* Writes the PSK KE modes extension into the output buffer. /* 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 idx;
} }
return SANITY_MSG_E; return (word16)SANITY_MSG_E;
} }
/* Parse the PSK KE modes extension. /* Parse the PSK KE modes extension.