On 20 Oct 2022 09:32, Tsukasa OI wrote: > Clang generates a warning if there is a block statement and another > adjacent statement with a misleading indent ("-Wmisleading-indentation"). > On the default configuration, it causes a build failure > (unless "--disable-werror" is specified). > > The cause of this warning, $(builddir)/sim/ppc/semantics.c is generated by > $(srcdir)/sim/ppc/igen.c and this commit fixes generating misleading > indentation by removing two spaces. > --- > sim/ppc/igen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c > index 27b48638276..786ea540d57 100644 > --- a/sim/ppc/igen.c > +++ b/sim/ppc/igen.c > @@ -233,7 +233,7 @@ gen_semantics_c(insn_table *table, > lf_printf(file, " option_mpc860c0 = 0;\n"); > lf_printf(file, " if (tree_find_property(root, \"/options/mpc860c0\"))\n"); > lf_printf(file, " option_mpc860c0 = tree_find_integer_property(root, \"/options/mpc860c0\");\n"); > - lf_printf(file, " option_mpc860c0 *= 4; /* convert word count to byte count */\n"); > + lf_printf(file, " option_mpc860c0 *= 4; /* convert word count to byte count */\n"); this maintains existing behavior, and logically it's the same, but i think we should fix the intention of the code -- add braces so that the *4 only happens inside the if statement. -mike