From 1a29ec78a0d15f599ff59442bdacc2b2343232d7 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sun, 28 Feb 2016 22:39:27 +0000
Subject: [PATCH] (widget_options_t) Cleanup -Wassign-enum warnings
warning looks like:
wtools.c:213:13: warning: integer constant not in range of enumerated type 'widget_options_t' [-Wassign-enum]
QUICK_LABELED_INPUT (p_text, input_label_above, def_text, histname, &my_str,
^
../../lib/widget/quick.h:65:16: note: expanded from macro 'QUICK_LABELED_INPUT'
.options = 0, \
^
boxes.c:489:17: warning: integer constant not in range of enumerated type 'widget_options_t' [-Wassign-enum]
QUICK_START_GROUPBOX (N_("File operations")),
^
../../lib/widget/quick.h:115:16: note: expanded from macro 'QUICK_START_GROUPBOX'
.options = 0, \
^
Signed-off-by: Andreas Mohr <and@gmx.li>
---
lib/widget/quick.h | 28 ++++++++++++++--------------
lib/widget/widget-common.h | 1 +
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/lib/widget/quick.h b/lib/widget/quick.h
index 73482d6..f53529d 100644
a
|
b
|
|
12 | 12 | #define QUICK_CHECKBOX(txt, st, id_) \ |
13 | 13 | { \ |
14 | 14 | .widget_type = quick_checkbox, \ |
15 | | .options = 0, \ |
| 15 | .options = W_NONE, \ |
16 | 16 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
17 | 17 | .id = id_, \ |
18 | 18 | .u = { \ |
… |
… |
|
26 | 26 | #define QUICK_BUTTON(txt, act, cb, id_) \ |
27 | 27 | { \ |
28 | 28 | .widget_type = quick_button, \ |
29 | | .options = 0, \ |
| 29 | .options = W_NONE, \ |
30 | 30 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
31 | 31 | .id = id_, \ |
32 | 32 | .u = { \ |
… |
… |
|
41 | 41 | #define QUICK_INPUT(txt, hname, res, id_, is_passwd_, strip_passwd_, completion_flags_) \ |
42 | 42 | { \ |
43 | 43 | .widget_type = quick_input, \ |
44 | | .options = 0, \ |
| 44 | .options = W_NONE, \ |
45 | 45 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
46 | 46 | .id = id_, \ |
47 | 47 | .u = { \ |
… |
… |
|
62 | 62 | #define QUICK_LABELED_INPUT(label_, label_loc, txt, hname, res, id_, is_passwd_, strip_passwd_, completion_flags_) \ |
63 | 63 | { \ |
64 | 64 | .widget_type = quick_input, \ |
65 | | .options = 0, \ |
| 65 | .options = W_NONE, \ |
66 | 66 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
67 | 67 | .id = id_, \ |
68 | 68 | .u = { \ |
… |
… |
|
83 | 83 | #define QUICK_LABEL(txt, id_) \ |
84 | 84 | { \ |
85 | 85 | .widget_type = quick_label, \ |
86 | | .options = 0, \ |
| 86 | .options = W_NONE, \ |
87 | 87 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
88 | 88 | .id = id_, \ |
89 | 89 | .u = { \ |
… |
… |
|
97 | 97 | #define QUICK_RADIO(cnt, items_, val, id_) \ |
98 | 98 | { \ |
99 | 99 | .widget_type = quick_radio, \ |
100 | | .options = 0, \ |
| 100 | .options = W_NONE, \ |
101 | 101 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
102 | 102 | .id = id_, \ |
103 | 103 | .u = { \ |
… |
… |
|
112 | 112 | #define QUICK_START_GROUPBOX(t) \ |
113 | 113 | { \ |
114 | 114 | .widget_type = quick_start_groupbox, \ |
115 | | .options = 0, \ |
| 115 | .options = W_NONE, \ |
116 | 116 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
117 | 117 | .id = NULL, \ |
118 | 118 | .u = { \ |
… |
… |
|
125 | 125 | #define QUICK_STOP_GROUPBOX \ |
126 | 126 | { \ |
127 | 127 | .widget_type = quick_stop_groupbox, \ |
128 | | .options = 0, \ |
| 128 | .options = W_NONE, \ |
129 | 129 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
130 | 130 | .id = NULL, \ |
131 | 131 | .u = { \ |
… |
… |
|
140 | 140 | #define QUICK_SEPARATOR(line_) \ |
141 | 141 | { \ |
142 | 142 | .widget_type = quick_separator, \ |
143 | | .options = 0, \ |
| 143 | .options = W_NONE, \ |
144 | 144 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
145 | 145 | .id = NULL, \ |
146 | 146 | .u = { \ |
… |
… |
|
154 | 154 | #define QUICK_START_COLUMNS \ |
155 | 155 | { \ |
156 | 156 | .widget_type = quick_start_columns, \ |
157 | | .options = 0, \ |
| 157 | .options = W_NONE, \ |
158 | 158 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
159 | 159 | .id = NULL, \ |
160 | 160 | .u = { \ |
… |
… |
|
169 | 169 | #define QUICK_NEXT_COLUMN \ |
170 | 170 | { \ |
171 | 171 | .widget_type = quick_next_column, \ |
172 | | .options = 0, \ |
| 172 | .options = W_NONE, \ |
173 | 173 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
174 | 174 | .id = NULL, \ |
175 | 175 | .u = { \ |
… |
… |
|
184 | 184 | #define QUICK_STOP_COLUMNS \ |
185 | 185 | { \ |
186 | 186 | .widget_type = quick_stop_columns, \ |
187 | | .options = 0, \ |
| 187 | .options = W_NONE, \ |
188 | 188 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
189 | 189 | .id = NULL, \ |
190 | 190 | .u = { \ |
… |
… |
|
199 | 199 | #define QUICK_START_BUTTONS(space_, line_) \ |
200 | 200 | { \ |
201 | 201 | .widget_type = quick_buttons, \ |
202 | | .options = 0, \ |
| 202 | .options = W_NONE, \ |
203 | 203 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
204 | 204 | .id = NULL, \ |
205 | 205 | .u = { \ |
… |
… |
|
218 | 218 | #define QUICK_END \ |
219 | 219 | { \ |
220 | 220 | .widget_type = quick_end, \ |
221 | | .options = 0, \ |
| 221 | .options = W_NONE, \ |
222 | 222 | .pos_flags = WPOS_KEEP_DEFAULT, \ |
223 | 223 | .id = NULL, \ |
224 | 224 | .u = { \ |
diff --git a/lib/widget/widget-common.h b/lib/widget/widget-common.h
index 0398a1e..e9c92ac 100644
a
|
b
|
typedef enum |
60 | 60 | /* Widget options */ |
61 | 61 | typedef enum |
62 | 62 | { |
| 63 | W_NONE = (1 << 0), |
63 | 64 | W_WANT_HOTKEY = (1 << 1), |
64 | 65 | W_WANT_CURSOR = (1 << 2), |
65 | 66 | W_WANT_IDLE = (1 << 3), |