Skip to content

Set compiler flags in CI workflow#4

Open
wkearn wants to merge 4 commits intoTopoToolbox:mainfrom
wkearn:set-compiler-warnings
Open

Set compiler flags in CI workflow#4
wkearn wants to merge 4 commits intoTopoToolbox:mainfrom
wkearn:set-compiler-warnings

Conversation

@wkearn
Copy link
Copy Markdown
Member

@wkearn wkearn commented Feb 27, 2026

These are the compiler flags used by libtopotoolbox. SWT will need to compile cleanly in order to be merged into libtopotoolbox, so we must resolve any compiler errors and warnings before moving forward. I have set the compiler to error on any warnings, which is somewhat strict, but will help us catch issues early on.

We set the flags in the CI workflow, not in the Makefile, to allow consumers of this package to choose the appropriate flags. This way one can still develop SWT in the presence of compiler warnings, but you won't be able to contribute PRs until the compiler warnings are resolved and the PR checks pass.

@wkearn wkearn mentioned this pull request Feb 27, 2026
@wkearn wkearn mentioned this pull request Mar 12, 2026
@wkearn wkearn mentioned this pull request Mar 27, 2026
These are the compiler flags used by libtopotoolbox. SWT will need to
compile cleanly in order to be merged into libtopotoolbox, so we must
resolve any compiler errors and warnings before moving
forward. I have set the compiler to error on any warnings, which is
somewhat strict, but will help us catch issues early on.

We set the flags in the CI workflow, not in the Makefile, to allow
consumers of this package to choose the appropriate flags. This way
one can still develop SWT in the presence of compiler warnings, but
you won't be able to contribute PRs until the compiler warnings are
resolved and the PR checks pass.

Signed-off-by: William Kearney <william.kearney@uni-potsdam.de>
@wkearn wkearn force-pushed the set-compiler-warnings branch from 28852b4 to a312538 Compare March 27, 2026 11:58
wkearn added 3 commits March 27, 2026 13:04
Signed-off-by: William Kearney <william.kearney@uni-potsdam.de>
with the -k option make keeps trying to build files until a target
can't be made. This should allow us to see errors from both swt.c and
find_seamounts.c. Previously, errors in swt.c would halt compilation
and hide any errors that might still exist in find_seamounts.c

Signed-off-by: William Kearney <william.kearney@uni-potsdam.de>
@wkearn
Copy link
Copy Markdown
Member Author

wkearn commented Mar 27, 2026

Hi John (@jkhillier),

I forgot that the tests that ran on your PR (#8) didn't have the full set of compiler warnings turned on, so a few more unused variable warnings showed up after I merged #8. I went ahead and removed the unused variables, but before I merge this one, you might want to look at the changes

https://github.com/TopoToolbox/SWT/pull/4/changes

to make sure that nothing was changed that shouldn't have been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant