Kaynağa Gözat

fix: cmux w5500 mobile soft_keyboard 库编译警告

Dozingfiretruck 7 ay önce
ebeveyn
işleme
e8a8c16327

+ 1 - 1
components/cmux/luat_cmux.c

@@ -172,7 +172,7 @@ static void uih_dbg_manage(unsigned char*buff,size_t len){
 }
 #ifdef LUAT_USE_YMODEM
 #include "luat_ymodem.h"
-static int ymodem_state = 0;
+// static int ymodem_state = 0;
 static void* ymodem_handler = NULL;
 #endif
 static void uih_download_manage(unsigned char*buff,size_t len){

+ 8 - 8
components/ethernet/w5500/w5500.c

@@ -440,9 +440,9 @@ W5500_SOCKET_CONFIG_START:
 
 static int w5500_socket_connect(w5500_ctrl_t *w5500, uint8_t socket_id, uint8_t is_listen, uint32_t remote_ip, uint16_t remote_port)
 {
-	uint32_t ip;
-	uint16_t port;
-	uint8_t delay_cnt;
+	// uint32_t ip;
+	// uint16_t port;
+	// uint8_t delay_cnt;
 	uint8_t temp;
 	uint8_t cmd[16];
 	temp = w5500_socket_state(w5500, socket_id);
@@ -487,7 +487,7 @@ static int w5500_socket_auto_heart(w5500_ctrl_t *w5500, uint8_t socket_id, uint8
 
 static int w5500_socket_tx(w5500_ctrl_t *w5500, uint8_t socket_id, uint8_t *data, uint32_t len)
 {
-	uint8_t delay_cnt;
+	// uint8_t delay_cnt;
 	uint8_t temp;
 	uint8_t point[6];
 	uint16_t tx_free, tx_point;
@@ -530,7 +530,7 @@ static int w5500_socket_tx(w5500_ctrl_t *w5500, uint8_t socket_id, uint8_t *data
 
 static int w5500_socket_rx(w5500_ctrl_t *w5500, uint8_t socket_id, uint8_t *data, uint16_t len)
 {
-	uint8_t delay_cnt;
+	// uint8_t delay_cnt;
 	uint8_t temp;
 	uint8_t point[4];
 	uint16_t rx_size, rx_point;
@@ -1182,7 +1182,7 @@ static void w5500_sys_socket_callback(w5500_ctrl_t *w5500, uint8_t socket_id, ui
 
 static void w5500_read_irq(w5500_ctrl_t *w5500)
 {
-	OS_EVENT socket_event;
+	// OS_EVENT socket_event;
 	uint8_t temp[64];
 	uint8_t socket_irqs[MAX_SOCK_NUM];
 	uint8_t socket_irq, common_irq;
@@ -1503,8 +1503,8 @@ int w5500_reset(void)
 
 void w5500_init(luat_spi_t* spi, uint8_t irq_pin, uint8_t rst_pin, uint8_t link_pin)
 {
-	uint8_t *uid;
-	size_t t, i;
+	// uint8_t *uid;
+	size_t i;
 	if (!prv_w5500_ctrl)
 	{
 		w5500_ctrl_t *w5500 = malloc(sizeof(w5500_ctrl_t));

+ 2 - 2
components/mobile/luat_lib_mobile.c

@@ -353,7 +353,7 @@ mobile.apn(0,1,"name","user","password",nil,3)
  */
 static int l_mobile_apn(lua_State* L) {
     char buff[64] = {0};
-    size_t len = 0;
+    // size_t len = 0;
     size_t wlen = 0;
     int ret = 0;
     int index = luaL_optinteger(L, 1, 0);
@@ -1250,7 +1250,7 @@ static int l_mobile_event_handle(lua_State* L, void* ptr) {
     LUAT_MOBILE_EVENT_E event;
     uint8_t index;
     uint8_t status;
-    int ret;
+    // int ret;
 
 
     rtos_msg_t* msg = (rtos_msg_t*)lua_topointer(L, -1);

+ 1 - 1
components/soft_keyboard/luat_lib_softkeyboard.c

@@ -93,7 +93,7 @@ int l_softkb_init(lua_State* L) {
     softkb.deinit(0)
  */
 int l_softkb_deinit(lua_State* L) {
-    luat_softkeyboard_conf_t conf = {0};
+    // luat_softkeyboard_conf_t conf = {0};
     uint8_t softkb_port = luaL_checkinteger(L,1);
     int ret = luat_softkeyboard_deinit(&softkb_conf[softkb_port]);
     luat_heap_free(softkb_conf[softkb_port].inio);

+ 1 - 1
luat/modules/luat_main.c

@@ -49,7 +49,7 @@ void luat_force_gc_all(void)
 }
 
 static int dolibrary (lua_State *L, const char *name) {
-  int status;
+//   int status;
   lua_getglobal(L, "require");
   lua_pushstring(L, name);
   lua_call(L, 1, 1);  /* call 'require(name)' */