Prechádzať zdrojové kódy

fix compiling warning.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@823 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 14 rokov pred
rodič
commit
5f399b692a

+ 3 - 3
components/rtgui/common/image_hdc.c

@@ -41,9 +41,9 @@ const struct rtgui_image_engine rtgui_image_hdcmm_engine =
 {
 	"hdcmm",
 	{RT_NULL},
-	{RT_NULL},
-	{RT_NULL},
-	{RT_NULL},
+	RT_NULL,
+	RT_NULL,
+	RT_NULL,
 	rtgui_image_hdcmm_blit
 };
 

+ 1 - 1
components/rtgui/server/topwin.c

@@ -100,7 +100,7 @@ rt_err_t rtgui_topwin_add(struct rtgui_event_win_create* event)
 #ifdef RTGUI_USING_SMALL_SIZE
 		topwin->title = rtgui_wintitle_create(event->wid->title);
 #else
-		topwin->title = rtgui_wintitle_create(event->title);
+		topwin->title = rtgui_wintitle_create((const char*)event->title);
 #endif
 		rtgui_widget_set_rect(RTGUI_WIDGET(topwin->title), &rect);
 

+ 2 - 2
components/rtgui/widgets/filelist_view.c

@@ -803,7 +803,7 @@ void rtgui_filelist_view_set_directory(rtgui_filelist_view_t* view, const char*
 				rt_sprintf(fullpath, "%s%s", directory, dirent->d_name);
 
 			stat(fullpath, &s);
-			if ( s.parent.st_mode & S_IFDIR )
+			if ( s.st_mode & S_IFDIR )
 			{
 				item->type = RTGUI_FITEM_DIR;
 				item->size = 0;
@@ -811,7 +811,7 @@ void rtgui_filelist_view_set_directory(rtgui_filelist_view_t* view, const char*
 			else
 			{
 				item->type = RTGUI_FITEM_FILE;
-				item->size = s.parent.st_size;
+				item->size = s.st_size;
 			}
 		}
 

+ 1 - 0
components/rtgui/widgets/widget.c

@@ -13,6 +13,7 @@
  * 2010-06-26     Bernard      add user_data to widget structure
  */
 
+#include <rtgui/dc_hw.h>
 #include <rtgui/widgets/widget.h>
 #include <rtgui/widgets/window.h>
 #include <rtgui/widgets/view.h>