Ver Fonte

将EVENT_CB(ev)宏函数中的handle参数强制类型转换为BtnCallback类型定义一致,而不是在函数调用时通过传递参数做隐性的类型转换。

Meco Man há 2 anos atrás
pai
commit
06fe54226c
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      multi_button.c

+ 1 - 1
multi_button.c

@@ -18,7 +18,7 @@
  */
 #include "multi_button.h"
 
-#define EVENT_CB(ev) if(handle->cb[ev]) handle->cb[ev]((button*)handle)
+#define EVENT_CB(ev) if(handle->cb[ev]) handle->cb[ev]((void*)handle)
 
 static struct button* head_handle = NULL;