Ver Fonte

编译器适配

Signed-off-by: MurphyZhao <d2014zjt@163.com>
MurphyZhao há 7 anos atrás
pai
commit
2c1356aae8
2 ficheiros alterados com 5 adições e 1 exclusões
  1. 3 1
      samples/mqtt/mqtt-example.c
  2. 2 0
      samples/ota/ota_mqtt-example.c

+ 3 - 1
samples/mqtt/mqtt-example.c

@@ -96,7 +96,8 @@ static char   *user_param = NULL;
 static void   *pclient;
 
 static uint8_t is_running = 0;
-		
+
+#if !defined(__GNUC__)
 static char* strlwr(char *str)
  {
     if(str == NULL)
@@ -111,6 +112,7 @@ static char* strlwr(char *str)
     }
     return str;
 }
+#endif
 
 static void event_handle(void *pcontext, void *pclient, iotx_mqtt_event_msg_pt msg)
 {

+ 2 - 0
samples/ota/ota_mqtt-example.c

@@ -85,6 +85,7 @@ static char g_ota_version[64] = "iotx_ver_1.0.0";
 static int      user_argc;
 static uint8_t is_running = 0;
 
+#if !defined(__GNUC__)
 static char* strlwr(char *str)
  {
     if(str == NULL)
@@ -99,6 +100,7 @@ static char* strlwr(char *str)
     }
     return str;
 }
+#endif
 
 static void event_handle(void *pcontext, void *pclient, iotx_mqtt_event_msg_pt msg)
 {