From e43c3fdf679222d30d3e51c2312567dd45159764 Mon Sep 17 00:00:00 2001 From: Supreet Deshpande Date: Sat, 23 Feb 2019 00:38:07 +0530 Subject: [PATCH] bugfix/compilation_warnings: Fixes minor compilation warnings Fixes minor compilation warnings in ADC and MQTTFreeRTOS. --- components/esp8266/driver/adc.c | 1 - components/mqtt/paho/MQTTClient-C/src/FreeRTOS/MQTTFreeRTOS.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/esp8266/driver/adc.c b/components/esp8266/driver/adc.c index eb4d1096..3c33be6c 100644 --- a/components/esp8266/driver/adc.c +++ b/components/esp8266/driver/adc.c @@ -25,7 +25,6 @@ #define ENTER_CRITICAL() portENTER_CRITICAL() #define EXIT_CRITICAL() portEXIT_CRITICAL() -static const char *TAG = "adc"; #define ADC_CHECK(a, str, ret_val) \ if (!(a)) { \ diff --git a/components/mqtt/paho/MQTTClient-C/src/FreeRTOS/MQTTFreeRTOS.c b/components/mqtt/paho/MQTTClient-C/src/FreeRTOS/MQTTFreeRTOS.c index 30edd274..059b5a26 100644 --- a/components/mqtt/paho/MQTTClient-C/src/FreeRTOS/MQTTFreeRTOS.c +++ b/components/mqtt/paho/MQTTClient-C/src/FreeRTOS/MQTTFreeRTOS.c @@ -70,7 +70,7 @@ void TimerCountdown(Timer *timer, unsigned int timeout) int TimerLeftMS(Timer *timer) { xTaskCheckForTimeOut(&timer->xTimeOut, &timer->xTicksToWait); /* updates xTicksToWait to the number left */ - return (timer->xTicksToWait < 0) ? 0 : (timer->xTicksToWait * portTICK_PERIOD_MS); + return (timer->xTicksToWait <= 0) ? 0 : (timer->xTicksToWait * portTICK_PERIOD_MS); }