work on -Wconversion...

This commit is contained in:
goldsimon
2017-07-05 22:31:58 +02:00
parent c5607d3889
commit 44f7a3cb0d
11 changed files with 86 additions and 54 deletions

View File

@@ -388,7 +388,7 @@ altcp_mbedtls_handle_rx_appldata(struct altcp_pcb *conn, altcp_mbedtls_state_t *
if (ret) {
LWIP_ASSERT("bogus receive length", ret <= PBUF_POOL_BUFSIZE);
/* trim pool pbuf to actually decoded length */
pbuf_realloc(buf, (uint16_t)ret);
pbuf_realloc(buf, (u16_t)ret);
state->bio_bytes_appl += ret;
if (mbedtls_ssl_get_bytes_avail(&state->ssl_context) == 0) {

View File

@@ -683,8 +683,8 @@ mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u
if (client->msg_idx <= MQTT_VAR_HEADER_BUFFER_LEN) {
/* Should have topic and pkt id*/
uint8_t *topic;
uint16_t after_topic;
u8_t *topic;
u16_t after_topic;
u8_t bkp;
u16_t topic_len = var_hdr_payload[0];
topic_len = (topic_len << 8) + (u16_t)(var_hdr_payload[1]);