From ff16d1dc951c21ceabf600e499eeb5d4344e81b7 Mon Sep 17 00:00:00 2001 From: kn Date: Wed, 23 Nov 2022 23:06:16 +0000 Subject: [PATCH] Fix sparc64 build/run constraints.c:269: warning: ISO C90 forbids mixed declarations and code from tb --- regress/lib/libcrypto/x509/constraints.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/regress/lib/libcrypto/x509/constraints.c b/regress/lib/libcrypto/x509/constraints.c index 933c4f47c84..d3fdf0e52b0 100644 --- a/regress/lib/libcrypto/x509/constraints.c +++ b/regress/lib/libcrypto/x509/constraints.c @@ -1,4 +1,4 @@ -/* $OpenBSD: constraints.c,v 1.13 2022/11/11 12:02:34 beck Exp $ */ +/* $OpenBSD: constraints.c,v 1.14 2022/11/23 23:06:16 kn Exp $ */ /* * Copyright (c) 2020 Bob Beck * @@ -254,9 +254,9 @@ test_invalid_hostnames(void) { int i, failure = 0; char *nulhost = "www.openbsd.org\0"; + CBS cbs; for (i = 0; invalid_hostnames[i] != NULL; i++) { - CBS cbs; CBS_init(&cbs, invalid_hostnames[i], strlen(invalid_hostnames[i])); if (x509_constraints_valid_host(&cbs)) { @@ -266,7 +266,6 @@ test_invalid_hostnames(void) goto done; } } - CBS cbs; CBS_init(&cbs, nulhost, strlen(nulhost) + 1); if (x509_constraints_valid_host(&cbs)) { FAIL("hostname with NUL byte accepted\n"); -- 2.20.1