[PATCH] fix warnings

Mikulas Patocka mikulas at artax.karlin.mff.cuni.cz
Tue Dec 11 23:40:32 UTC 2012


This patch fixes compile warnings

* src/filemanager/filegui.c defines macro STATFS but it doesn't use it, it 
uses statfs function instead.
This results in a warning because statfs has this prototype
"int statfs(const char *path, struct statfs *buf);", but we pass "struct 
statvfs" as an argument.

* ESC_CHAR is already defined in /usr/include/langinfo.h, so undefined it 
to avoid warning

Mikulas

Index: mc-4.8.6/src/filemanager/filegui.c
===================================================================
--- mc-4.8.6.orig/src/filemanager/filegui.c
+++ mc-4.8.6/src/filemanager/filegui.c
@@ -243,7 +243,7 @@ filegui__check_attrs_on_fs (const char *
     if (!setup_copymove_persistent_attr)
         return FALSE;
 
-    if (statfs (fs_path, &stfs) != 0)
+    if (STATFS (fs_path, &stfs) != 0)
         return TRUE;
 
 #ifdef __linux__
Index: mc-4.8.6/lib/global.h
===================================================================
--- mc-4.8.6.orig/lib/global.h
+++ mc-4.8.6/lib/global.h
@@ -127,6 +127,9 @@
 #define BUF_TINY 64
 
 /* AIX compiler doesn't understand '\e' */
+#ifdef ESC_CHAR
+#undef ESC_CHAR
+#endif
 #define ESC_CHAR '\033'
 #define ESC_STR  "\033"
 



More information about the mc-devel mailing list