Module Name: src Committed By: mrg Date: Mon Aug 7 23:29:58 UTC 2023
Modified Files: src/tests/lib/libbpfjit: t_bpfjit.c Log Message: avoid uninitialised variable. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libbpfjit/t_bpfjit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libbpfjit/t_bpfjit.c diff -u src/tests/lib/libbpfjit/t_bpfjit.c:1.14 src/tests/lib/libbpfjit/t_bpfjit.c:1.15 --- src/tests/lib/libbpfjit/t_bpfjit.c:1.14 Sat Feb 14 22:40:18 2015 +++ src/tests/lib/libbpfjit/t_bpfjit.c Mon Aug 7 23:29:58 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: t_bpfjit.c,v 1.14 2015/02/14 22:40:18 alnsn Exp $ */ +/* $NetBSD: t_bpfjit.c,v 1.15 2023/08/07 23:29:58 mrg Exp $ */ /*- * Copyright (c) 2011-2012, 2014-2015 Alexander Nasonov. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_bpfjit.c,v 1.14 2015/02/14 22:40:18 alnsn Exp $"); +__RCSID("$NetBSD: t_bpfjit.c,v 1.15 2023/08/07 23:29:58 mrg Exp $"); #include <atf-c.h> #include <stdint.h> @@ -65,7 +65,7 @@ ATF_TC_HEAD(libbpfjit_empty, tc) ATF_TC_BODY(libbpfjit_empty, tc) { - struct bpf_insn dummy; + struct bpf_insn dummy = { 0 }; ATF_CHECK(!bpf_validate(&dummy, 0)); ATF_CHECK(bpfjit_generate_code(NULL, &dummy, 0) == NULL);