summaryrefslogtreecommitdiffstats
path: root/util/check-format-test-negatives.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-03-10 08:12:57 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-03-18 13:43:36 +0100
commit90a7c90500ddb3c29eff988a8840ffc1e3e44e7a (patch)
tree7a7cfb94947ab96dd29cf037261037a1ae75d305 /util/check-format-test-negatives.c
parentaed723f1e402d286f1f655e5fd93b9ff8a55452f (diff)
fix false positive of check-format.pl regarding '#if' on preceding line; extend negative tests
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/11285)
Diffstat (limited to 'util/check-format-test-negatives.c')
-rw-r--r--util/check-format-test-negatives.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/util/check-format-test-negatives.c b/util/check-format-test-negatives.c
index c9f781e06b..35cbd75ba3 100644
--- a/util/check-format-test-negatives.c
+++ b/util/check-format-test-negatives.c
@@ -113,7 +113,46 @@ int f(void) /*
5;
else
6;
+
+ if (1) {
+ if (2) {
+ case MAC_TYPE_MAC:
+ {
+ EVP_MAC_CTX *new_mac_ctx;
+
+ if (ctx->pkey == NULL)
+ return 0;
+ }
+ break;
+ default:
+ /* This should be dead code */
+ return 0;
+ }
+ }
+ if (expr_line1
+ == expr_line2
+ && expr_line3) {
+ c1;
+ } else {
+ c;
+ d;
+ }
+ if (expr_line1
+ == expr_line2
+ && expr_line3)
+ hanging_stmt;
}
+
+const OPTIONS passwd_options[] = {
+ {"aixmd5", OPT_AIXMD5, '-', "AIX MD5-based password algorithm"},
+#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_DEPRECATED_3_0)
+ {"crypt", OPT_CRYPT, '-', "Standard Unix password algorithm (default)"},
+#endif
+ OPT_R_OPTIONS,
+
+ {NULL}
+};
+
typedef * d(int)
x;
typedef (int)