git: 70f5c6e34ffd - main - tests/netinet: push variable 'sin' into function scope
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Feb 2024 05:09:24 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=70f5c6e34ffd21c5dd41e35c72dc1b0e84d67a21 commit 70f5c6e34ffd21c5dd41e35c72dc1b0e84d67a21 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-02-03 05:08:16 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-02-03 05:09:02 +0000 tests/netinet: push variable 'sin' into function scope This should fix build with GCC 13. Fixes: 861274c9f8cf2a5c00ded9580ea91b22def683f7 --- tests/sys/netinet/tcp_implied_connect.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/sys/netinet/tcp_implied_connect.c b/tests/sys/netinet/tcp_implied_connect.c index 2961626d5e5b..6e8cb0606a0a 100644 --- a/tests/sys/netinet/tcp_implied_connect.c +++ b/tests/sys/netinet/tcp_implied_connect.c @@ -33,17 +33,15 @@ #include <atf-c.h> -static struct sockaddr_in sin = { - .sin_family = AF_INET, - .sin_len = sizeof(sin), -}; - -static const char buf[] = "hello"; -static char repl[sizeof(buf)]; - ATF_TC_WITHOUT_HEAD(tcp_implied_connect); ATF_TC_BODY(tcp_implied_connect, tc) { + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(sin), + }; + const char buf[] = "hello"; + char repl[sizeof(buf)]; socklen_t len; int s, c, a;