summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-21 03:33:07 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-28 08:22:39 -0500
commit3b541978562a0f553b0c0253d927d55612dd97b1 (patch)
tree193d45c781713724794a98091d4d3bfd6a5d3d26 /scripts/kconfig
parent9abe42371b44ef3e10e068d3e461c3a97192fb46 (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/Makefile4
-rw-r--r--scripts/kconfig/gconf.c2
-rw-r--r--scripts/kconfig/images.c32
-rw-r--r--scripts/kconfig/images.h33
-rw-r--r--scripts/kconfig/qconf.cc2
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
179hostprogs-y += qconf 179hostprogs-y += qconf
180qconf-cxxobjs := qconf.o 180qconf-cxxobjs := qconf.o
181qconf-objs := $(common-objs) 181qconf-objs := images.o $(common-objs)
182 182
183HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs) 183HOSTLDLIBS_qconf = $(shell . $(obj)/.qconf-cfg && echo $$libs)
184HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/.qconf-cfg && echo $$cflags) 184HOSTCXXFLAGS_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+
195hostprogs-y += gconf 195hostprogs-y += gconf
196gconf-objs := gconf.o $(common-objs) 196gconf-objs := gconf.o images.o $(common-objs)
197 197
198HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs) 198HOSTLDLIBS_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs)
199HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags) 199HOSTCFLAGS_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
6static const char *xpm_load[] = { 6#include "images.h"
7
8const 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
36static const char *xpm_save[] = { 38const 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
66static const char *xpm_back[] = { 68const 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
94static const char *xpm_tree_view[] = { 96const 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
121static const char *xpm_single_view[] = { 123const 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
148static const char *xpm_split_view[] = { 150const 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
175static const char *xpm_symbol_no[] = { 177const 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
192static const char *xpm_symbol_mod[] = { 194const 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
209static const char *xpm_symbol_yes[] = { 211const 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
226static const char *xpm_choice_no[] = { 228const 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
243static const char *xpm_choice_yes[] = { 245const 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
260static const char *xpm_menu[] = { 262const 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
277static const char *xpm_menu_inv[] = { 279const 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
294static const char *xpm_menuback[] = { 296const 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
311static const char *xpm_void[] = { 313const 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
10extern "C" {
11#endif
12
13extern const char *xpm_load[];
14extern const char *xpm_save[];
15extern const char *xpm_back[];
16extern const char *xpm_tree_view[];
17extern const char *xpm_single_view[];
18extern const char *xpm_split_view[];
19extern const char *xpm_symbol_no[];
20extern const char *xpm_symbol_mod[];
21extern const char *xpm_symbol_yes[];
22extern const char *xpm_choice_no[];
23extern const char *xpm_choice_yes[];
24extern const char *xpm_menu[];
25extern const char *xpm_menu_inv[];
26extern const char *xpm_menuback[];
27extern 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
38static QApplication *configApp; 38static QApplication *configApp;