csky/opcodes: enclose if body in curly braces
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 24 Sep 2020 14:03:43 +0000 (15:03 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 24 Sep 2020 14:14:53 +0000 (15:14 +0100)
commit011a045a6b3ea45115221a4fbdc2da87c82a6055
tree5a89ddbeddf86d10e5941545dc004fa2df48da9b
parenta2ab58313a248e4848c69c8d11ff547539a3c46f
csky/opcodes: enclose if body in curly braces

This commit:

  commit afdcafe89118cee761f9bf67ea1b1efc29311300
  Date:   Thu Sep 17 14:30:28 2020 +0800

      CSKY: Add objdump option -M abi-names.

cases the build of GDB (configured with --enabled-targets=all) to fail
with this error:

  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/opcodes -I. -I../../src/opcodes -I../bfd -I../../src/opcodes/../include -I../../src/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -O0 -g3 -D_GLIBCXX_DEBUG=1 -MT csky-dis.lo -MD -MP -MF .deps/csky-dis.Tpo -c ../../src/opcodes/csky-dis.c -o csky-dis.o
  ../../src/opcodes/csky-dis.c: In function 'csky_output_operand':
  ../../src/opcodes/csky-dis.c:849:7: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
    849 |       if (IS_CSKY_V1 (mach_flag))
        |       ^~
  ../../src/opcodes/csky-dis.c:851:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    851 |  strcat (str, buf);
        |  ^~~~~~

this commit adds { ... } around the if body to resolve this issue.

opcodes/ChangeLog:

* csky-dis.c (csky_output_operand): Enclose body of if in curly
braces.
opcodes/ChangeLog
opcodes/csky-dis.c
This page took 0.025739 seconds and 4 git commands to generate.