Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-14 11:55:46 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-14 11:55:54 +0100
commitccfb1217c4aafe77be4db637abea9a33dc4e2011 (patch)
tree09f7d4622db5172d5a4f6ec1491f2b215a6099ff
parent83b0eec88094bc4d2b498e928bb1438bddbfc1cb (diff)
kconfig: fix file name and line number of
warn_ignored_character() (bsc#1051510).
-rw-r--r--patches.fixes/kconfig-fix-file-name-and-line-number-of-warn_ignore.patch60
-rw-r--r--series.conf1
2 files changed, 61 insertions, 0 deletions
diff --git a/patches.fixes/kconfig-fix-file-name-and-line-number-of-warn_ignore.patch b/patches.fixes/kconfig-fix-file-name-and-line-number-of-warn_ignore.patch
new file mode 100644
index 0000000000..56beb751b0
--- /dev/null
+++ b/patches.fixes/kconfig-fix-file-name-and-line-number-of-warn_ignore.patch
@@ -0,0 +1,60 @@
+From 77c1c0fa8b1477c5799bdad65026ea5ff676da44 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Tue, 11 Dec 2018 20:00:44 +0900
+Subject: [PATCH] kconfig: fix file name and line number of warn_ignored_character()
+Git-commit: 77c1c0fa8b1477c5799bdad65026ea5ff676da44
+Patch-mainline: v5.0-rc1
+References: bsc#1051510
+
+Currently, warn_ignore_character() displays invalid file name and
+line number.
+
+The lexer should use current_file->name and yylineno, while the parser
+should use zconf_curname() and zconf_lineno().
+
+This difference comes from that the lexer is always going ahead
+of the parser. The parser needs to look ahead one token to make a
+shift/reduce decision, so the lexer is requested to scan more text
+from the input file.
+
+This commit fixes the warning message from warn_ignored_character().
+
+[Test Code]
+
+ ----(Kconfig begin)----
+ /
+ -----(Kconfig end)-----
+
+[Output]
+
+ Before the fix:
+
+ <none>:0:warning: ignoring unsupported character '/'
+
+ After the fix:
+
+ Kconfig:1:warning: ignoring unsupported character '/'
+
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ scripts/kconfig/zconf.l | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
+index 25bd2b89fe3f..eeac64ccc730 100644
+--- a/scripts/kconfig/zconf.l
++++ b/scripts/kconfig/zconf.l
+@@ -73,7 +73,7 @@ static void warn_ignored_character(char chr)
+ {
+ fprintf(stderr,
+ "%s:%d:warning: ignoring unsupported character '%c'\n",
+- zconf_curname(), zconf_lineno(), chr);
++ current_file->name, yylineno, chr);
+ }
+ %}
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 9f5ef5e2b4..dc2fd991c0 100644
--- a/series.conf
+++ b/series.conf
@@ -20109,6 +20109,7 @@
patches.drivers/misc-vexpress-Off-by-one-in-vexpress_syscfg_exec.patch
patches.fixes/genwqe-Fix-size-check.patch
patches.drivers/intel_th-msu-Fix-an-off-by-one-in-attribute-store.patch
+ patches.fixes/kconfig-fix-file-name-and-line-number-of-warn_ignore.patch
patches.suse/sched-fair-Fix-infinite-loop-in-update_blocked_averages-by-reverting-a9e7f6544b9c.patch
patches.fixes/seq_buf-Make-seq_buf_puts-null-terminate-the-buffer.patch
patches.drivers/soc-bcm-brcmstb-Don-t-leak-device-tree-node-referenc.patch