Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Build using C99 and C11 #575

Merged

Conversation

rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Apr 5, 2021

While the code base is still sprinkled with POSIX dependencies, this PR ensures the following:

  • We do not use any GCC specific compiler extensions anymore
  • Our code is compatible with C99

When reviewing, this should give you a couple of warnings (same as in master), but otherwise work:

tools/ci/run_ci.sh --clean --build --c-standard 11 --c-extensions ON
tools/ci/run_ci.sh --clean --build --c-standard 11 --c-extensions OFF
tools/ci/run_ci.sh --clean --build --c-standard 99 --c-extensions ON
tools/ci/run_ci.sh --clean --build --c-standard 99 --c-extensions OFF

Using this new version of run_ci.sh and the code from the current master, all builds with disabled extensions fail and the C99 ones throw additional warnings.

@rettichschnidi
Copy link
Contributor Author

@qleisan Added some description about how to test the PR.

@sbernard31
Copy link
Contributor

I will rebase on master once #570 got merged.

It's integrated. :-)

@sbernard31
Copy link
Contributor

Should I wait action was no more stuck on queued state before to integrate this in master ?

@rettichschnidi
Copy link
Contributor Author

rettichschnidi commented Apr 6, 2021

Should I wait action was no more stuck on queued state before to integrate this in master ?

I think so, yes. While like to have stuff merged quickly, we should not merge anything that has not passed all tests IMHO.

While we do not have any non-GNU-compatible compilers in CI, disabling
compiler extensions and enabling -pedantic should help us to keep
specific compiler extensions at bay.

Because this code base is still quite POSIX dependent, _POSIX_C_SOURCE
is defined manually.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
@sbernard31 sbernard31 merged commit 2f6d699 into eclipse-wakaama:master Apr 7, 2021
@rettichschnidi rettichschnidi deleted the gardena/rs/c-standards branch April 7, 2021 08:17
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.

3 participants