This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=e20fd993e4f66a9fcbd6ee70857e7428d1413abc commit e20fd993e4f66a9fcbd6ee70857e7428d1413abc Author: Guillem Jover <[email protected]> AuthorDate: Fri Feb 24 03:12:48 2023 +0100 test: Disable -Wassign-enum for tests using out of range enum values We are testing the behavior of these functions when we pass out of range values, so we should disable the warning. Warned-by: clang-16 -Wassign-enum --- lib/dpkg/t/t-arch.c | 2 ++ lib/dpkg/t/t-pkginfo.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/dpkg/t/t-arch.c b/lib/dpkg/t/t-arch.c index 430980ee3..d0b5735cb 100644 --- a/lib/dpkg/t/t-arch.c +++ b/lib/dpkg/t/t-arch.c @@ -104,7 +104,9 @@ test_dpkg_arch_find(void) test_str(arch->name, ==, ""); /* Test for an unknown type. */ + DPKG_IGNORE_WARNING_ASSIGN_ENUM(); test_pass(dpkg_arch_get(1000) == NULL); + DPKG_ACCEPT_WARNING_ASSIGN_ENUM(); /* New valid architectures are marked unknown. */ arch = dpkg_arch_find("foobar"); diff --git a/lib/dpkg/t/t-pkginfo.c b/lib/dpkg/t/t-pkginfo.c index 787cefeaa..b974027b9 100644 --- a/lib/dpkg/t/t-pkginfo.c +++ b/lib/dpkg/t/t-pkginfo.c @@ -57,8 +57,10 @@ test_pkginfo_eflags(void) pkg_clear_eflags(&pkg, PKG_EFLAG_REINSTREQ); test_pass(pkg.eflag == PKG_EFLAG_OK); + DPKG_IGNORE_WARNING_ASSIGN_ENUM(); pkg_set_eflags(&pkg, 0x11); test_pass(pkg.eflag == 0x11); + DPKG_ACCEPT_WARNING_ASSIGN_ENUM(); pkg_reset_eflags(&pkg); test_pass(pkg.eflag == PKG_EFLAG_OK); } -- Dpkg.Org's dpkg

