Fix code warning.
Change-Id: Ib11fb49f528d3688351ae349d5b4e307c28b3967
diff --git a/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c b/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c
index 5d99258..684878f 100755
--- a/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c
+++ b/mbtk/test/libmbtk_mqtt/mbtk_mqtt_test.c
@@ -11,6 +11,7 @@
#include "fcntl.h"
#include "mbtk_sock2.h"
+void iot_yield(Cloud_MQTT_t *piot_mqtt,iot_device_info_t *gateway);
struct opts_struct opts = {
(char *)"iot-dev", 0, (char *)"\n", QOS0, "admin", "password", (char *)"localhost", 1883, 0
@@ -70,7 +71,7 @@
printf("input error.\n example:./mqtt_test 192.168.1.1 8080 clientid username password\n");
return 0;
}
- int ret, len;
+ int ret ;
char will_msg[256] = {"hello world"}; //初始化遗嘱数据
static int retry_count = 0;
pthread_t thread_ID; //定义线程id
@@ -96,7 +97,7 @@
if(ret < 0 && retry_count > 5)
{
printf("reconnect times more than 5 exit\n");
- return NULL;
+ return -1;
}
retry_count = 0;