]> git.sur5r.net Git - openocd/commit
arm7: add missing braces around an if()
authorAleksander Morgado <aleksander@aleksander.es>
Wed, 11 May 2016 07:58:47 +0000 (09:58 +0200)
committerFreddie Chopin <freddie.chopin@gmail.com>
Sat, 14 May 2016 10:51:40 +0000 (11:51 +0100)
commit866774a690095740e86035d5adc30aa1b6b4c58e
treef7ede470064cd632d8d98f250dac8386463e6a37
parent4d4d22e9d204960d570e82165b647ea0e3a727e9
arm7: add missing braces around an if()

Spotted by gcc:

    arm7_9_common.c: In function ‘arm7_9_unset_breakpoint’:
    arm7_9_common.c:353:4: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
        if (current_instr == arm7_9->thumb_bkpt)
        ^~
    arm7_9_common.c:356:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         if (retval != ERROR_OK)
         ^~

The logic won't change once the braces have been added, as the new 'retval'
check only makes sense within the if().

Change-Id: I6a303e118f2150e5eb25c9268ad06de5d8a533b2
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Reviewed-on: http://openocd.zylin.com/3477
Tested-by: jenkins
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/target/arm7_9_common.c