diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-28 09:18:01 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-30 20:51:23 +0200 |
commit | 13a574d8bb2523181f8150de49bc041c9841f59d (patch) | |
tree | d901940756cad14da1653880508e96e20ed14431 /util/check-format-test-positives.c | |
parent | 8e655da0225eb399675aaa05f4ba36e9347043ca (diff) |
check-format.pl: Allow nested indentation of labels (not only at line pos 1)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13019)
Diffstat (limited to 'util/check-format-test-positives.c')
-rw-r--r-- | util/check-format-test-positives.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/check-format-test-positives.c b/util/check-format-test-positives.c index 7d9bbea5c7..c2ad61f0d2 100644 --- a/util/check-format-test-positives.c +++ b/util/check-format-test-positives.c @@ -117,7 +117,9 @@ int f (int a, /*@ space after fn before '(', reported unless sloppy-spc */ do f(c, c); /*@ (non-brace) code after 'do' */ while ( 2); /*@ space after '(', reported unless sloppy-spc */ b; c; /*@ more than one statement per line */ + outer: /*@ outer label special indent off by 1 */ do{ /*@ no space before '{', reported unless sloppy-spc */ + inner: /*@ inner label normal indent off by 1 */ f (3, /*@ space after fn before '(', reported unless sloppy-spc */ 4); /*@0 false negative: should report single stmt in braces */ } /*@0 'while' not on same line as preceding '}' */ @@ -127,7 +129,6 @@ int f (int a, /*@ space after fn before '(', reported unless sloppy-spc */ case(2): /*@ no space after 'case', reported unless sloppy-spc */ default: ; /*@ code after 'default:' */ } /*@ statement indent off by -4 */ - label: /*@ label special statement indent off by 1 */ return( /*@ no space after 'return', reported unless sloppy-spc */ x); } /*@ code before block-level '}' */ /* Here the tool should stop complaining apart from the below issues at EOF */ |