From 14169f7e8e2830520c3cecc9734c9b9e4360c396 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Tue, 23 Nov 2010 12:22:48 +0000 Subject: [PATCH] fix some compiling warning. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1101 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/rtgui/include/rtgui/widgets/button.h | 4 ++-- components/rtgui/widgets/button.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/rtgui/include/rtgui/widgets/button.h b/components/rtgui/include/rtgui/widgets/button.h index f5a0c9796..989f75364 100644 --- a/components/rtgui/include/rtgui/widgets/button.h +++ b/components/rtgui/include/rtgui/widgets/button.h @@ -61,8 +61,8 @@ typedef struct rtgui_button rtgui_button_t; rtgui_type_t *rtgui_button_type_get(void); -rtgui_button_t* rtgui_button_create(char* text); -rtgui_button_t* rtgui_pushbutton_create(char* text); +rtgui_button_t* rtgui_button_create(const char* text); +rtgui_button_t* rtgui_pushbutton_create(const char* text); void rtgui_button_destroy(rtgui_button_t* btn); void rtgui_button_set_pressed_image(rtgui_button_t* btn, rtgui_image_t* image); diff --git a/components/rtgui/widgets/button.c b/components/rtgui/widgets/button.c index 8d24d191f..e4f3bc102 100644 --- a/components/rtgui/widgets/button.c +++ b/components/rtgui/widgets/button.c @@ -194,7 +194,7 @@ rt_bool_t rtgui_button_event_handler(struct rtgui_widget* widget, struct rtgui_e return RT_FALSE; } -rtgui_button_t* rtgui_button_create(char* text) +rtgui_button_t* rtgui_button_create(const char* text) { struct rtgui_button* btn; @@ -214,7 +214,7 @@ rtgui_button_t* rtgui_button_create(char* text) return btn; } -rtgui_button_t* rtgui_pushbutton_create(char* text) +rtgui_button_t* rtgui_pushbutton_create(const char* text) { rtgui_button_t* btn;