xen/Kconfig: Fix -Wformat-security when compiling with Clang
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 26 Jun 2019 16:50:06 +0000 (17:50 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Jun 2019 17:50:41 +0000 (18:50 +0100)
commitde07781ed69cc18b405831b7a7ade1038a1690f4
tree6bf4cf81af9b408cfd8819382270616a8d593425
parentdeec8e8450e39a6f1eaeafa9a245ab7e6bfb878b
xen/Kconfig: Fix -Wformat-security when compiling with Clang

Clang observes:

tools/kconfig/conf.c:77:10:
warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
                printf(_("aborted!\n\n"));
                       ^~~~~~~~~~~~~~~~~

And it is absolutely correct.  gettext() can easily return a string with a %
in.

This could be fixed by switching to using printf("%s", _(...)), or by
switching to puts() (as there is no formatting going on), but the better
option is follow Linux and remove localisation support.

Linux changeset: 694c49a7c01cc87194be40cb26404b58b68c291c
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Tue May 22 20:36:12 2018

kconfig: drop localization support

The localization support is broken and appears unused.
There is no google hits on the update-po-config target.
And there is no recent (5 years) activity related to the localization.

So lets just drop this as it is no longer used.

Suggested-by: Ulf Magnusson <ulfalizer@gmail.com>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[Ported to Xen]
Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
22 files changed:
xen/tools/kconfig/.gitignore
xen/tools/kconfig/Makefile
xen/tools/kconfig/POTFILES.in [deleted file]
xen/tools/kconfig/check.sh [deleted file]
xen/tools/kconfig/conf.c
xen/tools/kconfig/confdata.c
xen/tools/kconfig/gconf.c
xen/tools/kconfig/kxgettext.c [deleted file]
xen/tools/kconfig/lkc.h
xen/tools/kconfig/lxdialog/checklist.c
xen/tools/kconfig/lxdialog/dialog.h
xen/tools/kconfig/lxdialog/inputbox.c
xen/tools/kconfig/lxdialog/menubox.c
xen/tools/kconfig/lxdialog/textbox.c
xen/tools/kconfig/lxdialog/yesno.c
xen/tools/kconfig/mconf.c
xen/tools/kconfig/menu.c
xen/tools/kconfig/nconf.c
xen/tools/kconfig/nconf.h
xen/tools/kconfig/qconf.cc
xen/tools/kconfig/zconf.tab.c_shipped
xen/tools/kconfig/zconf.y