From ffcccaf6a5e85a7d31c5a71880a85c5b895d6b7f Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sat, 16 Jul 2016 18:52:39 +0000
Subject: [PATCH] Cleanup unused macro warnings
Cleanup unused macro warnings.
charsets.c:61:9: warning: macro is not used [-Wunused-macros]
#define CP_ASCII 0
^
strverscmp.c:41:10: warning: macro is not used [-Wunused-macros]
#define S_N 0x0
^
strverscmp.c:42:10: warning: macro is not used [-Wunused-macros]
#define S_I 0x4
^
strverscmp.c:43:10: warning: macro is not used [-Wunused-macros]
#define S_F 0x8
^
strverscmp.c:44:10: warning: macro is not used [-Wunused-macros]
#define S_Z 0xC
^
strverscmp.c:47:10: warning: macro is not used [-Wunused-macros]
#define CMP 2
^
strverscmp.c:48:10: warning: macro is not used [-Wunused-macros]
#define LEN 3
^
vfs.c:82:9: warning: macro is not used [-Wunused-macros]
#define ISSLASH(a) (a == '\0' || IS_PATH_SEP (a))
^
input_complete.c:74:9: warning: macro is not used [-Wunused-macros]
#define cr_whitespace(c) (whitespace (c) || (c) == '\n' || (c) == '\r')
^
editcmd.c:107:9: warning: macro is not used [-Wunused-macros]
#define is_digit(x) ((x) >= '0' && (x) <= '9')
^
editcmd.c:102:9: warning: macro is not used [-Wunused-macros]
#define INPUT_INDEX 9
^
syntax.c:82:9: warning: macro is not used [-Wunused-macros]
#define MAX_CONTEXTS 128
^
syntax.c:77:9: warning: macro is not used [-Wunused-macros]
#define TRANSIENT_WORD_TIME_OUT 60
^
syntax.c:79:9: warning: macro is not used [-Wunused-macros]
#define UNKNOWN_FORMAT "unknown"
^
syntax.c:81:9: warning: macro is not used [-Wunused-macros]
#define MAX_WORDS_PER_CONTEXT 1024
^
achown.c:69:9: warning: macro is not used [-Wunused-macros]
#define B_OTH (B_USER + 5)
^
achown.c:68:9: warning: macro is not used [-Wunused-macros]
#define B_GRP (B_USER + 4)
^
achown.c:71:9: warning: macro is not used [-Wunused-macros]
#define B_OGROUP (B_USER + 7)
^
achown.c:67:9: warning: macro is not used [-Wunused-macros]
#define B_OWN (B_USER + 3)
^
achown.c:70:9: warning: macro is not used [-Wunused-macros]
#define B_OUSER (B_USER + 6)
^
cmd.c:102:9: warning: macro is not used [-Wunused-macros]
#define MAP_FILE 0
^
filegui.c:176:9: warning: macro is not used [-Wunused-macros]
#define WITH_FULL_PATHS 1
^
hotlist.c:77:9: warning: macro is not used [-Wunused-macros]
#define LABELS 3
^
hotlist.c:75:9: warning: macro is not used [-Wunused-macros]
#define BY (LINES - 6)
^
hotlist.c:74:9: warning: macro is not used [-Wunused-macros]
#define BX UX
^
layout.c:1144:9: warning: macro is not used [-Wunused-macros]
#define panelswapstr(e) strcpy (panel.e, panel1->e); \
^
panelize.c:66:9: warning: macro is not used [-Wunused-macros]
#define LABELS 3
^
ftpfs.c:155:9: warning: macro is not used [-Wunused-macros]
#define UPLOAD_ZERO_LENGTH_FILE
^
Signed-off-by: Andreas Mohr <and@gmx.li>
---
lib/charsets.c | 6 ------
lib/strutil/strverscmp.c | 4 ++++
lib/vfs/vfs.c | 2 --
lib/widget/input_complete.c | 1 -
src/editor/editcmd.c | 7 -------
src/editor/syntax.c | 7 -------
src/filemanager/achown.c | 5 -----
src/filemanager/cmd.c | 2 ++
src/filemanager/filegui.c | 3 ---
src/filemanager/hotlist.c | 4 ----
src/filemanager/layout.c | 5 -----
src/filemanager/panelize.c | 1 -
src/vfs/ftpfs/ftpfs.c | 1 -
13 files changed, 6 insertions(+), 42 deletions(-)
diff --git a/lib/charsets.c b/lib/charsets.c
index 148c691..9a08054 100644
a
|
b
|
const char *cp_source = NULL; |
54 | 54 | |
55 | 55 | #define OTHER_8BIT "Other_8_bit" |
56 | 56 | |
57 | | /* |
58 | | * FIXME: This assumes that ASCII is always the first encoding |
59 | | * in mc.charsets |
60 | | */ |
61 | | #define CP_ASCII 0 |
62 | | |
63 | 57 | /*** file scope type declarations ****************************************************************/ |
64 | 58 | |
65 | 59 | /*** file scope variables ************************************************************************/ |
diff --git a/lib/strutil/strverscmp.c b/lib/strutil/strverscmp.c
index a37131c..81f878a 100644
a
|
b
|
|
36 | 36 | |
37 | 37 | /*** file scope macro definitions ****************************************************************/ |
38 | 38 | |
| 39 | #ifndef HAVE_STRVERSCMP |
| 40 | |
39 | 41 | /* states: S_N: normal, S_I: comparing integral part, S_F: comparing |
40 | 42 | fractionnal parts, S_Z: idem but with leading Zeroes only */ |
41 | 43 | #define S_N 0x0 |
… |
… |
|
47 | 49 | #define CMP 2 |
48 | 50 | #define LEN 3 |
49 | 51 | |
| 52 | #endif /* HAVE_STRVERSCMP */ |
| 53 | |
50 | 54 | /*** file scope type declarations ****************************************************************/ |
51 | 55 | |
52 | 56 | /*** file scope variables ************************************************************************/ |
diff --git a/lib/vfs/vfs.c b/lib/vfs/vfs.c
index 49a6762..ed8034a 100644
a
|
b
|
vfs_class *current_vfs = NULL; |
79 | 79 | |
80 | 80 | #define VFS_FIRST_HANDLE 100 |
81 | 81 | |
82 | | #define ISSLASH(a) (a == '\0' || IS_PATH_SEP (a)) |
83 | | |
84 | 82 | /*** file scope type declarations ****************************************************************/ |
85 | 83 | |
86 | 84 | struct vfs_openfile |
diff --git a/lib/widget/input_complete.c b/lib/widget/input_complete.c
index 1534531..ab46ad3 100644
a
|
b
|
extern char **environ; |
71 | 71 | #endif /* DO_CMPLETION_DEBUG */ |
72 | 72 | |
73 | 73 | #define whitespace(c) ((c) == ' ' || (c) == '\t') |
74 | | #define cr_whitespace(c) (whitespace (c) || (c) == '\n' || (c) == '\r') |
75 | 74 | |
76 | 75 | #define DO_INSERTION 1 |
77 | 76 | #define DO_QUERY 2 |
diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c
index aee2013..e70ae17 100644
a
|
b
|
int option_drop_selection_on_copy = 1; |
99 | 99 | |
100 | 100 | #define TEMP_BUF_LEN 1024 |
101 | 101 | |
102 | | #define INPUT_INDEX 9 |
103 | | |
104 | | /* thanks to Liviu Daia <daia@stoilow.imar.ro> for getting this |
105 | | (and the above) routines to work properly - paul */ |
106 | | |
107 | | #define is_digit(x) ((x) >= '0' && (x) <= '9') |
108 | | |
109 | 102 | #define MAX_WORD_COMPLETIONS 100 /* in listbox */ |
110 | 103 | |
111 | 104 | /*** file scope type declarations ****************************************************************/ |
diff --git a/src/editor/syntax.c b/src/editor/syntax.c
index 3f4de4c..96f9ca4 100644
a
|
b
|
int option_auto_syntax = 1; |
74 | 74 | /* bytes */ |
75 | 75 | #define SYNTAX_MARKER_DENSITY 512 |
76 | 76 | |
77 | | #define TRANSIENT_WORD_TIME_OUT 60 |
78 | | |
79 | | #define UNKNOWN_FORMAT "unknown" |
80 | | |
81 | | #define MAX_WORDS_PER_CONTEXT 1024 |
82 | | #define MAX_CONTEXTS 128 |
83 | | |
84 | 77 | #define RULE_ON_LEFT_BORDER 1 |
85 | 78 | #define RULE_ON_RIGHT_BORDER 2 |
86 | 79 | |
diff --git a/src/filemanager/achown.c b/src/filemanager/achown.c
index dd8a85c..a2199f8 100644
a
|
b
|
|
64 | 64 | |
65 | 65 | #define B_SETALL B_USER |
66 | 66 | #define B_SKIP (B_USER + 1) |
67 | | #define B_OWN (B_USER + 3) |
68 | | #define B_GRP (B_USER + 4) |
69 | | #define B_OTH (B_USER + 5) |
70 | | #define B_OUSER (B_USER + 6) |
71 | | #define B_OGROUP (B_USER + 7) |
72 | 67 | |
73 | 68 | /*** file scope type declarations ****************************************************************/ |
74 | 69 | |
diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c
index 1884589..7d148c7 100644
a
|
b
|
|
98 | 98 | |
99 | 99 | /*** file scope macro definitions ****************************************************************/ |
100 | 100 | |
| 101 | #ifdef HAVE_MMAP |
101 | 102 | #ifndef MAP_FILE |
102 | 103 | #define MAP_FILE 0 |
103 | 104 | #endif |
| 105 | #endif /* HAVE_MMAP */ |
104 | 106 | |
105 | 107 | /*** file scope type declarations ****************************************************************/ |
106 | 108 | |
diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c
index 72fd3e3..2b6871a 100644
a
|
b
|
int classic_progressbar = 1; |
172 | 172 | |
173 | 173 | /*** file scope macro definitions ****************************************************************/ |
174 | 174 | |
175 | | /* Hack: the vfs code should not rely on this */ |
176 | | #define WITH_FULL_PATHS 1 |
177 | | |
178 | 175 | #define truncFileString(dlg, s) str_trunc (s, WIDGET (dlg)->cols - 10) |
179 | 176 | #define truncFileStringSecure(dlg, s) path_trunc (s, WIDGET (dlg)->cols - 10) |
180 | 177 | |
diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c
index f4e016e..b77e212 100644
a
|
b
|
|
71 | 71 | #define UX 3 |
72 | 72 | #define UY 2 |
73 | 73 | |
74 | | #define BX UX |
75 | | #define BY (LINES - 6) |
76 | | |
77 | | #define LABELS 3 |
78 | 74 | #define B_ADD_CURRENT B_USER |
79 | 75 | #define B_REMOVE (B_USER + 1) |
80 | 76 | #define B_NEW_GROUP (B_USER + 2) |
diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c
index e4deb86..06022c8 100644
a
|
b
|
swap_panels (void) |
1140 | 1140 | WPanel panel; |
1141 | 1141 | |
1142 | 1142 | #define panelswap(x) panel.x = panel1->x; panel1->x = panel2->x; panel2->x = panel.x; |
1143 | | |
1144 | | #define panelswapstr(e) strcpy (panel.e, panel1->e); \ |
1145 | | strcpy (panel1->e, panel2->e); \ |
1146 | | strcpy (panel2->e, panel.e); |
1147 | 1143 | /* Change content and related stuff */ |
1148 | 1144 | panelswap (dir); |
1149 | 1145 | panelswap (active); |
… |
… |
swap_panels (void) |
1156 | 1152 | panelswap (selected); |
1157 | 1153 | panelswap (is_panelized); |
1158 | 1154 | panelswap (dir_stat); |
1159 | | #undef panelswapstr |
1160 | 1155 | #undef panelswap |
1161 | 1156 | |
1162 | 1157 | panel1->searching = FALSE; |
diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c
index b468695..9715b35 100644
a
|
b
|
|
63 | 63 | #define UX 3 |
64 | 64 | #define UY 2 |
65 | 65 | |
66 | | #define LABELS 3 |
67 | 66 | #define B_ADD B_USER |
68 | 67 | #define B_REMOVE (B_USER + 1) |
69 | 68 | |
diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c
index 391bd55..e60b6ec 100644
a
|
b
|
int ftpfs_ignore_chattr_errors = 1; |
152 | 152 | #define MAXHOSTNAMELEN 64 |
153 | 153 | #endif |
154 | 154 | |
155 | | #define UPLOAD_ZERO_LENGTH_FILE |
156 | 155 | #define SUP ((ftp_super_data_t *) super->data) |
157 | 156 | #define FH_SOCK ((ftp_fh_data_t *) fh->data)->sock |
158 | 157 | |