diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-21 03:33:07 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-28 08:22:39 -0500 |
commit | 3b541978562a0f553b0c0253d927d55612dd97b1 (patch) | |
tree | 193d45c781713724794a98091d4d3bfd6a5d3d26 /scripts/kconfig | |
parent | 9abe42371b44ef3e10e068d3e461c3a97192fb46 (diff) |
kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings
Currently, images.c is included by qconf.cc and gconf.c.
qconf.cc uses all of xpm_* arrays, but gconf.c only some of them.
Hence, lots of "... defined but not used" warnings are displayed
while compiling gconf.c
Splitting out images.c fixes the warnings.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
-rw-r--r-- | scripts/kconfig/gconf.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/images.c | 32 | ||||
-rw-r--r-- | scripts/kconfig/images.h | 33 | ||||
-rw-r--r-- | scripts/kconfig/qconf.cc | 2 |
5 files changed, 54 insertions, 19 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 65cdf8c36cb4..ec204fa54c9a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -178,7 +178,7 @@ $(addprefix $(obj)/lxdialog/, $(lxdialog)): $(obj)/.mconf-cfg | |||
178 | # qconf: Used for the xconfig target based on Qt | 178 | # qconf: Used for the xconfig target based on Qt |
179 | hostprogs-y += qconf | 179 | hostprogs-y += qconf |
180 | qconf-cxxobjs := qconf.o | 180 | qconf-cxxobjs := qconf.o |
181 | qconf-objs := $(common-objs) | 181 | qconf-objs := images.o $(common-objs) |
182 | 182 | ||
183 | HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs) | 183 | HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs) |
184 | HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags) | 184 | HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags) |
@@ -193,7 +193,7 @@ $(obj)/%.moc: $(src)/%.h $(obj)/.qconf-cfg | |||
193 | 193 | ||
194 | # gconf: Used for the gconfig target based on GTK+ | 194 | # gconf: Used for the gconfig target based on GTK+ |
195 | hostprogs-y += gconf | 195 | hostprogs-y += gconf |
196 | gconf-objs := gconf.o $(common-objs) | 196 | gconf-objs := gconf.o images.o $(common-objs) |
197 | 197 | ||
198 | HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs) | 198 | HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs) |
199 | HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags) | 199 | HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags) |
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 2d4e5a1e3a30..b3d438c531fc 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | #include "lkc.h" | 11 | #include "lkc.h" |
12 | #include "images.c" | 12 | #include "images.h" |
13 | 13 | ||
14 | #include <glade/glade.h> | 14 | #include <glade/glade.h> |
15 | #include <gtk/gtk.h> | 15 | #include <gtk/gtk.h> |
diff --git a/scripts/kconfig/images.c b/scripts/kconfig/images.c index ef43b81c516c..b4fa0e4a63a5 100644 --- a/scripts/kconfig/images.c +++ b/scripts/kconfig/images.c | |||
@@ -3,7 +3,9 @@ | |||
3 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> | 3 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | static const char *xpm_load[] = { | 6 | #include "images.h" |
7 | |||
8 | const char *xpm_load[] = { | ||
7 | "22 22 5 1", | 9 | "22 22 5 1", |
8 | ". c None", | 10 | ". c None", |
9 | "# c #000000", | 11 | "# c #000000", |
@@ -33,7 +35,7 @@ static const char *xpm_load[] = { | |||
33 | "###############.......", | 35 | "###############.......", |
34 | "......................"}; | 36 | "......................"}; |
35 | 37 | ||
36 | static const char *xpm_save[] = { | 38 | const char *xpm_save[] = { |
37 | "22 22 5 1", | 39 | "22 22 5 1", |
38 | ". c None", | 40 | ". c None", |
39 | "# c #000000", | 41 | "# c #000000", |
@@ -63,7 +65,7 @@ static const char *xpm_save[] = { | |||
63 | "..##################..", | 65 | "..##################..", |
64 | "......................"}; | 66 | "......................"}; |
65 | 67 | ||
66 | static const char *xpm_back[] = { | 68 | const char *xpm_back[] = { |
67 | "22 22 3 1", | 69 | "22 22 3 1", |
68 | ". c None", | 70 | ". c None", |
69 | "# c #000083", | 71 | "# c #000083", |
@@ -91,7 +93,7 @@ static const char *xpm_back[] = { | |||
91 | "......................", | 93 | "......................", |
92 | "......................"}; | 94 | "......................"}; |
93 | 95 | ||
94 | static const char *xpm_tree_view[] = { | 96 | const char *xpm_tree_view[] = { |
95 | "22 22 2 1", | 97 | "22 22 2 1", |
96 | ". c None", | 98 | ". c None", |
97 | "# c #000000", | 99 | "# c #000000", |
@@ -118,7 +120,7 @@ static const char *xpm_tree_view[] = { | |||
118 | "......................", | 120 | "......................", |
119 | "......................"}; | 121 | "......................"}; |
120 | 122 | ||
121 | static const char *xpm_single_view[] = { | 123 | const char *xpm_single_view[] = { |
122 | "22 22 2 1", | 124 | "22 22 2 1", |
123 | ". c None", | 125 | ". c None", |
124 | "# c #000000", | 126 | "# c #000000", |
@@ -145,7 +147,7 @@ static const char *xpm_single_view[] = { | |||
145 | "......................", | 147 | "......................", |
146 | "......................"}; | 148 | "......................"}; |
147 | 149 | ||
148 | static const char *xpm_split_view[] = { | 150 | const char *xpm_split_view[] = { |
149 | "22 22 2 1", | 151 | "22 22 2 1", |
150 | ". c None", | 152 | ". c None", |
151 | "# c #000000", | 153 | "# c #000000", |
@@ -172,7 +174,7 @@ static const char *xpm_split_view[] = { | |||
172 | "......................", | 174 | "......................", |
173 | "......................"}; | 175 | "......................"}; |
174 | 176 | ||
175 | static const char *xpm_symbol_no[] = { | 177 | const char *xpm_symbol_no[] = { |
176 | "12 12 2 1", | 178 | "12 12 2 1", |
177 | " c white", | 179 | " c white", |
178 | ". c black", | 180 | ". c black", |
@@ -189,7 +191,7 @@ static const char *xpm_symbol_no[] = { | |||
189 | " .......... ", | 191 | " .......... ", |
190 | " "}; | 192 | " "}; |
191 | 193 | ||
192 | static const char *xpm_symbol_mod[] = { | 194 | const char *xpm_symbol_mod[] = { |
193 | "12 12 2 1", | 195 | "12 12 2 1", |
194 | " c white", | 196 | " c white", |
195 | ". c black", | 197 | ". c black", |
@@ -206,7 +208,7 @@ static const char *xpm_symbol_mod[] = { | |||
206 | " .......... ", | 208 | " .......... ", |
207 | " "}; | 209 | " "}; |
208 | 210 | ||
209 | static const char *xpm_symbol_yes[] = { | 211 | const char *xpm_symbol_yes[] = { |
210 | "12 12 2 1", | 212 | "12 12 2 1", |
211 | " c white", | 213 | " c white", |
212 | ". c black", | 214 | ". c black", |
@@ -223,7 +225,7 @@ static const char *xpm_symbol_yes[] = { | |||
223 | " .......... ", | 225 | " .......... ", |
224 | " "}; | 226 | " "}; |
225 | 227 | ||
226 | static const char *xpm_choice_no[] = { | 228 | const char *xpm_choice_no[] = { |
227 | "12 12 2 1", | 229 | "12 12 2 1", |
228 | " c white", | 230 | " c white", |
229 | ". c black", | 231 | ". c black", |
@@ -240,7 +242,7 @@ static const char *xpm_choice_no[] = { | |||
240 | " .... ", | 242 | " .... ", |
241 | " "}; | 243 | " "}; |
242 | 244 | ||
243 | static const char *xpm_choice_yes[] = { | 245 | const char *xpm_choice_yes[] = { |
244 | "12 12 2 1", | 246 | "12 12 2 1", |
245 | " c white", | 247 | " c white", |
246 | ". c black", | 248 | ". c black", |
@@ -257,7 +259,7 @@ static const char *xpm_choice_yes[] = { | |||
257 | " .... ", | 259 | " .... ", |
258 | " "}; | 260 | " "}; |
259 | 261 | ||
260 | static const char *xpm_menu[] = { | 262 | const char *xpm_menu[] = { |
261 | "12 12 2 1", | 263 | "12 12 2 1", |
262 | " c white", | 264 | " c white", |
263 | ". c black", | 265 | ". c black", |
@@ -274,7 +276,7 @@ static const char *xpm_menu[] = { | |||
274 | " .......... ", | 276 | " .......... ", |
275 | " "}; | 277 | " "}; |
276 | 278 | ||
277 | static const char *xpm_menu_inv[] = { | 279 | const char *xpm_menu_inv[] = { |
278 | "12 12 2 1", | 280 | "12 12 2 1", |
279 | " c white", | 281 | " c white", |
280 | ". c black", | 282 | ". c black", |
@@ -291,7 +293,7 @@ static const char *xpm_menu_inv[] = { | |||
291 | " .......... ", | 293 | " .......... ", |
292 | " "}; | 294 | " "}; |
293 | 295 | ||
294 | static const char *xpm_menuback[] = { | 296 | const char *xpm_menuback[] = { |
295 | "12 12 2 1", | 297 | "12 12 2 1", |
296 | " c white", | 298 | " c white", |
297 | ". c black", | 299 | ". c black", |
@@ -308,7 +310,7 @@ static const char *xpm_menuback[] = { | |||
308 | " .......... ", | 310 | " .......... ", |
309 | " "}; | 311 | " "}; |
310 | 312 | ||
311 | static const char *xpm_void[] = { | 313 | const char *xpm_void[] = { |
312 | "12 12 2 1", | 314 | "12 12 2 1", |
313 | " c white", | 315 | " c white", |
314 | ". c black", | 316 | ". c black", |
diff --git a/scripts/kconfig/images.h b/scripts/kconfig/images.h new file mode 100644 index 000000000000..d8ff614bd087 --- /dev/null +++ b/scripts/kconfig/images.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | /* | ||
3 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> | ||
4 | */ | ||
5 | |||
6 | #ifndef IMAGES_H | ||
7 | #define IMAGES_H | ||
8 | |||
9 | #ifdef __cplusplus | ||
10 | extern "C" { | ||
11 | #endif | ||
12 | |||
13 | extern const char *xpm_load[]; | ||
14 | extern const char *xpm_save[]; | ||
15 | extern const char *xpm_back[]; | ||
16 | extern const char *xpm_tree_view[]; | ||
17 | extern const char *xpm_single_view[]; | ||
18 | extern const char *xpm_split_view[]; | ||
19 | extern const char *xpm_symbol_no[]; | ||
20 | extern const char *xpm_symbol_mod[]; | ||
21 | extern const char *xpm_symbol_yes[]; | ||
22 | extern const char *xpm_choice_no[]; | ||
23 | extern const char *xpm_choice_yes[]; | ||
24 | extern const char *xpm_menu[]; | ||
25 | extern const char *xpm_menu_inv[]; | ||
26 | extern const char *xpm_menuback[]; | ||
27 | extern const char *xpm_void[]; | ||
28 | |||
29 | #ifdef __cplusplus | ||
30 | } | ||
31 | #endif | ||
32 | |||
33 | #endif /* IMAGES_H */ | ||
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index c897998f9652..8be8a70c5542 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "qconf.h" | 32 | #include "qconf.h" |
33 | 33 | ||
34 | #include "qconf.moc" | 34 | #include "qconf.moc" |
35 | #include "images.c" | 35 | #include "images.h" |
36 | 36 | ||
37 | 37 | ||
38 | static QApplication *configApp; | 38 | static QApplication *configApp; |