]> git.gag.com Git - fw/openocd/commit
coding-style: additional style for C code
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 2 May 2021 21:03:33 +0000 (23:03 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 8 May 2021 08:50:43 +0000 (09:50 +0100)
commit3d46346e07893fe6495a6c17fc06c710196f95e1
treeb3836afb0b49d1f04895e7c3ed3e38368138e7a6
parentc5c2a8300136d2c7d536aae3cfad7324372e5dfc
coding-style: additional style for C code

To improve readability and to push more uniform code style.

Prefer 'if (false) {...}' for unused code so it get checked by the
compiler.
Define preferred indentation for 'switch' statement.
Require balanced brackets in 'if/else'.
Report the max line length.
Report the formatting strings for stdint/inttypes types.
Report the type 'target_addr_t'.
Prefer 'unsigned int' to 'unsigned'.

Change-Id: I0192a4ed298f6c6c432764fdd156cffd4b13fc89
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6203
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Marc Schink <dev@zapb.de>
doc/manual/style.txt