Commit 32a94b8b authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: remove duplicated file name and lineno of recursive inclusion

As in the unit test, the error message for the recursive inclusion
looks like this:

  Kconfig.inc1:4: recursive inclusion detected. Inclusion path:
    current file : 'Kconfig.inc1'
    included from: 'Kconfig.inc3:1'
    included from: 'Kconfig.inc2:3'
    included from: 'Kconfig.inc1:4'

The 'Kconfig.inc1:4' is duplicated in the first and last lines.
Also, the single quotes do not help readability.

Change the message like follows:

  Recursive inclusion detected.
  Inclusion path:
    current file : Kconfig.inc1
    included from: Kconfig.inc3:1
    included from: Kconfig.inc2:3
    included from: Kconfig.inc1:4
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 26561514
Kconfig.inc1:4: recursive inclusion detected. Inclusion path: Recursive inclusion detected.
current file : 'Kconfig.inc1' Inclusion path:
included from: 'Kconfig.inc3:1' current file : Kconfig.inc1
included from: 'Kconfig.inc2:3' included from: Kconfig.inc3:1
included from: 'Kconfig.inc1:4' included from: Kconfig.inc2:3
included from: Kconfig.inc1:4
...@@ -328,14 +328,13 @@ void zconf_nextfile(const char *name) ...@@ -328,14 +328,13 @@ void zconf_nextfile(const char *name)
for (iter = current_file->parent; iter; iter = iter->parent ) { for (iter = current_file->parent; iter; iter = iter->parent ) {
if (!strcmp(current_file->name,iter->name) ) { if (!strcmp(current_file->name,iter->name) ) {
fprintf(stderr, fprintf(stderr,
"%s:%d: recursive inclusion detected. " "Recursive inclusion detected.\n"
"Inclusion path:\n current file : '%s'\n", "Inclusion path:\n"
zconf_curname(), zconf_lineno(), " current file : %s\n", zconf_curname());
zconf_curname());
iter = current_file; iter = current_file;
do { do {
iter = iter->parent; iter = iter->parent;
fprintf(stderr, " included from: '%s:%d'\n", fprintf(stderr, " included from: %s:%d\n",
iter->name, iter->lineno - 1); iter->name, iter->lineno - 1);
} while (strcmp(iter->name, current_file->name)); } while (strcmp(iter->name, current_file->name));
exit(1); exit(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment