From 26d835f8fd9cdff4004c72949685424f97ac19e4 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 13 Jun 2025 16:44:08 +0200 Subject: [PATCH] check-format-test-negatives.c: add 2nd macro indent test and hint on how known false positives are marked Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27836) (cherry picked from commit e925b99f9435826aca3fa41b7661e6e9fa7e10b6) --- util/check-format-test-negatives.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/check-format-test-negatives.c b/util/check-format-test-negatives.c index 93cf20228bb..33abf002153 100644 --- a/util/check-format-test-negatives.c +++ b/util/check-format-test-negatives.c @@ -10,7 +10,7 @@ /* * A collection of test cases where check-format.pl should not report issues. - * There are some known false positives, though, which are marked below. + * There are some known false positives, though, which are marked below using /*@ */ #include /* should not report whitespace nits within <...> */ @@ -264,7 +264,14 @@ int g(void) && expr_line3) hanging_stmt; } -#define m \ + +#define m1 \ + if (ctx == NULL) \ + return 0; \ + if (ossl_param_is_empty(params)) \ + return 1; \ + +#define m2 \ do { /* should not be confused with function header followed by '{' */ \ } while (0) -- 2.47.2