kconfig: Add some missing curly braces
Subsystems (3)
PATCH 1/1 kconfig: Add some missing curly braces
There are missing curly braces here so we print some stuff to stderr which we hadn't intended.
scripts/kconfig/symbol.c +2 -1
@@ -1127,11 +1127,12 @@ static void sym_check_print_recursive(struct symbol *last_sym)break ; } } -if (stack->sym = last_sym) +if (stack->sym = last_sym) {fprintf (stderr,"%s:%d:error: recursive dependency detected!\n" , prop->file->name, prop->lineno);fprintf (stderr,"For a resolution refer to Documentation/kbuild/kconfig-language.txt\n" );fprintf (stderr,"subsection \"Kconfig recursive dependency limitations\"\n" ); + }if (stack->expr) { fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", prop->file->name, prop->lineno,
Quoted 5 lines · Dan Carpenter
There are missing curly braces here so we print some stuff to stderr which we hadn't intended.
Fixes 1c199f2878f6 ('kbuild: document recursive dependency limitation / resolution')Signed-off-by Dan Carpenter <[email protected]>
Luis
2016-07-14 7:34 GMT+09:00 Dan Carpenter <[email protected]>:
Quoted 14 lines
There are missing curly braces here so we print some stuff to stderr which we hadn't intended.
Fixes 1c199f2878f6 ('kbuild: document recursive dependency limitation / resolution')Signed-off-by Dan Carpenter <[email protected]>scripts/kconfig/symbol.c +0
-0@@ -1127,11 +1127,12 @@ static void sym_check_print_recursive(struct symbol *last_sym)break ; } }
scripts/kconfig/symbol.c static void sym_check_print_recursive(struct symbol *last_sym) · line 1138
Quoted 10 lines
scripts/kconfig/symbol.c +2
-1-if (stack->sym = last_sym) +if (stack->sym = last_sym) {fprintf (stderr,"%s:%d:error: recursive dependency detected!\n" , prop->file->name, prop->lineno);fprintf (stderr,"For a resolution refer to Documentation/kbuild/kconfig-language.txt\n" );fprintf (stderr,"subsection \"Kconfig recursive dependency limitations\"\n" ); + }if (stack->expr) { fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", prop->file->name, prop->lineno,
Good catch!
BTW, another solution is to concatenate three messages into one.
if (stack->sym = last_sym)
fprintf(stderr,
"%s:%d:error: recursive dependency detected!\n" "For a resolution refer to
Documentation/kbuild/kconfig-language.txt\n"
"subsection \"Kconfig recursive dependency limitations\"\n", prop->file->name, prop->lineno);
Personally, I prefer this.
It may be a matter of taste, though.
Signature · 2 lines
Best Regards Masahiro Yamada