[PATCH] fix warnings
- From: Mikulas Patocka <mikulas artax karlin mff cuni cz>
- To: Andrew Borodin <aborodin vmail ru>
- Cc: mc-devel gnome org
- Subject: [PATCH] fix warnings
- Date: Wed, 12 Dec 2012 00:40:32 +0100 (CET)
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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]