Fix indentation (and clang warning) in c-lang.c
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 18 Dec 2019 18:27:18 +0000 (13:27 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 18 Dec 2019 18:27:18 +0000 (13:27 -0500)
commite623f035020ea7baa64933b4afaaa564b4c7e26d
tree32159da2a99dd9994e54d1257dc56c97d1736a56
parent28ce7b07473c33f2e4e380a861973d68ffe8017f
Fix indentation (and clang warning) in c-lang.c

I see this warning when building with clang:

      CXX    c-lang.o
    /home/smarchi/src/binutils-gdb/gdb/c-lang.c:314:7: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
          *length = i * width;
          ^
    /home/smarchi/src/binutils-gdb/gdb/c-lang.c:308:4: note: previous statement is here
              if (extract_unsigned_integer (contents + i * width,
              ^

It took me a while to notice that some lines in that area have a
spurious space before the tabs, at the beginning of the ling.  I'm not
sure how clang translates that to misleading indentation, but making the
indentation correct gets rid of the error.

There are many more instances of this in the code base (`grep -P '^ \t'
*.c`), if others think it's a good idea, it would be pretty easy to fix
them all up in one shot.

gdb/ChangeLog:

* c-lang.c (c_get_string, asm_language_defn): Remove space
before tab.
gdb/ChangeLog
gdb/c-lang.c
This page took 0.023892 seconds and 4 git commands to generate.