kumquat-buildroot/support/kconfig
Edgar Bonet 324612d68e support/kconfig: fix compiler warnings
Compiling on Ubuntu 20.04 generates this:

./util.c: In function ‘file_write_dep’
./util.c:54:18: warning: ‘..config.tmp’ directive writing 12 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   54 |  sprintf(buf, "%s..config.tmp", dir);
      |                  ^~~~~~~~~~~~
./util.c:54:2: note: ‘sprintf’ output between 13 and 4109 bytes into a destination of size 4097
   54 |  sprintf(buf, "%s..config.tmp", dir);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and similar warnings on confdata.c, lines 778, 989, 995, 1000, 1007,
1040, 1046 and 1054. Avoid the warnings by enlarging the destination
buffer of fprintf().

Normally, we want changes to kconfig to be reflected by patches in
support/kconfig/patches. This makes it easier to resync with upstream
kconfig. However, in this case, everything that is changed here is
already changed completely (and differently) upstream, so there is no
added value in keeping the patch.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-10-06 21:11:09 +02:00
..
lxdialog
patches
.gitignore
check.sh
conf.c
confdata.c support/kconfig: fix compiler warnings 2021-10-06 21:11:09 +02:00
expr.c
expr.h
foo.h
gconf.c
gconf.glade
images.c
kconf_id.c
kxgettext.c
list.h
lkc_proto.h
lkc.h
Makefile
Makefile.br
mconf.c
menu.c
merge_config.sh
nconf.c
nconf.gui.c
nconf.h
POTFILES.in
qconf.cc
qconf.h
README.buildroot
streamline_config.pl
symbol.c
util.c support/kconfig: fix compiler warnings 2021-10-06 21:11:09 +02:00
zconf.l
zconf.lex.c_shipped
zconf.tab.c_shipped
zconf.y

This is a copy of the kconfig code in the kernel (currently 4.17-rc2) tweaked
to suit Buildroot.

To update:
	cp -r /usr/src/linux/scripts/kconfig support/kconfig.new
	cd support/kconfig.new
	# zconf.lex.c and zconf.tab.c needs to be generated by 'make menuconfig'
	mv zconf.lex.c zconf.lex.c_shipped
	mv zconf.tab.c zconf.tab.c_shipped
	rm -rf tests/
	cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore .
	quilt push -a
	# Fix any conflict
	cd ..
	rm -rf kconfig
	mv kconfig.new kconfig

Then verify the toplevel targets work:
	config
	defconfig
	menuconfig
	nconfig
	xconfig
	gconfig
	oldconfig