diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-07-25 18:14:33 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2022-09-02 21:32:46 +0200 |
commit | 0a8a9f8f634306bbfaed8f924d71536f1ff50677 (patch) | |
tree | 1153e9636ce0fd20480b79a819f20b0f85acffde /util/check-format-test-negatives.c | |
parent | 521f07eb08cc267001ecb4be67d46ea79dbb62b1 (diff) |
check-format.pl: further fixes for whitespace reporting within 'for (...)'
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18812)
Diffstat (limited to 'util/check-format-test-negatives.c')
-rw-r--r-- | util/check-format-test-negatives.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/util/check-format-test-negatives.c b/util/check-format-test-negatives.c index c271bd77bd..48e61accb1 100644 --- a/util/check-format-test-negatives.c +++ b/util/check-format-test-negatives.c @@ -117,17 +117,24 @@ int g(void) /* leading comment has same indentation as normal code */ stmt; /* entire-line comment may have same indent as normal code */ } - - for (;;) - ; - for (i = 0;;) - ; - for (i = 0; i < 1;) - ; - for (;;) + for (i = 0; i < n; i++) for (; i < n; i++) - for (;; p++) - ; + for (i = 0; ; i++) + for (i = 0;; i++) + for (i = 0; i < n; ) + for (i = 0; i < n;) + ; + for (i = 0; ; ) + for (i = 0; ;) + for (i = 0;; ) + for (i = 0;;) + for (; i < n; ) + for (; j < n;) + for (; ; i++) + for (;; i++) + ; + for (;;) /* the only variant allowed in case of "empty" for (...) */ + ; for (;;) ; /* should not trigger: space before ';' */ lab: ; /* should not trigger: space before ';' */ |