From 90683b1a344893e6b157212b1335dc6b7dbf7f84 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 3 Nov 2023 09:30:38 +0100 Subject: [PATCH] github: fix build with clang and in ubuntu build-root Signed-off-by: Karel Zak --- .github/workflows/cibuild-setup-ubuntu.sh | 2 ++ libsmartcols/src/filter-parser.y | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/cibuild-setup-ubuntu.sh b/.github/workflows/cibuild-setup-ubuntu.sh index bcd46c719f..34774d3a42 100755 --- a/.github/workflows/cibuild-setup-ubuntu.sh +++ b/.github/workflows/cibuild-setup-ubuntu.sh @@ -30,6 +30,8 @@ PACKAGES=( dmsetup python3-dev gawk + bison + flex ) PACKAGES_OPTIONAL=( diff --git a/libsmartcols/src/filter-parser.y b/libsmartcols/src/filter-parser.y index 0af556c25a..d9bc2e1b6e 100644 --- a/libsmartcols/src/filter-parser.y +++ b/libsmartcols/src/filter-parser.y @@ -1,4 +1,11 @@ %{ +#ifdef __clang__ +/* clang detects yynerrs as unused. + * Will be fixed in future versions of bison. + */ +#pragma clang diagnostic ignored "-Wunused-but-set-variable" +#endif + #include #include "smartcolsP.h" -- 2.47.3