Skip to content

Commit

Permalink
Turn on -Werror for Java in GitHub -Werror workflows (#4243)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed Mar 26, 2024
1 parent 9a08e3f commit db8193d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main-auto-spc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,10 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
CFLAGS=-Werror JAVACFLAGS=-Werror JNIFLAGS=-Werror \
$GITHUB_WORKSPACE/configure \
--enable-build-mode=debug \
--enable-warnings-as-errors \
--enable-deprecated-symbols \
--with-default-api-version=v114 \
--enable-shared \
Expand Down Expand Up @@ -478,8 +480,10 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
CFLAGS=-Werror JAVACFLAGS=-Werror JNIFLAGS=-Werror \
$GITHUB_WORKSPACE/configure \
--enable-build-mode=production \
--enable-warnings-as-errors \
--enable-deprecated-symbols \
--with-default-api-version=v114 \
--enable-shared \
Expand Down
1 change: 0 additions & 1 deletion config/gnu-warnings/8
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-Wattribute-alias
-Wcast-align=strict
-Wshift-overflow=2
11 changes: 11 additions & 0 deletions config/gnu-warnings/error-8
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@
# that GCC 8 only performs that analysis at -O3, though.
#
-Werror=maybe-uninitialized
# Ask GCC to warn about cast-align problems, even on platforms where
# it normally wouldn't (because those platforms don't require alignment).
# While this flag doesn't follow the -Werror format like above, it's
# placed here to make sure that it comes after the -Werror=cast-align
# line from error-general in the list of flags. Otherwise, if the
# '--enable-warnings-as-errors' flag isn't passed at configure time,
# the logic in config/gnu-flags that demotes these errors to their
# normal warning form will cause -Wcast-align to come after
# -Wcast-align=strict in the list of flags, causing it to take
# precedence and mask cast-align warnings from GCC on certain platforms.
-Wcast-align=strict

0 comments on commit db8193d

Please sign in to comment.