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

Avoid violating -Wpedantic #1272

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

myint
Copy link

@myint myint commented Feb 9, 2022

This cleans up the GCC/Clang compiler warnings like:

extra ‘;’ [-Wpedantic] }; // namespace StringUtils
Originating Project/Creator JPL COLDArm / Steven Myint
Affected Component Multiple
Affected Architectures(s) All
Related Issue(s) n/a
Has Unit Tests (y/n) n/a
Builds Without Errors (y/n) y
Unit Tests Pass (y/n) n/a
Documentation Included (y/n) no

Change Description

Remove unnecessary semicolons from Fw/Types/StringUtils.hpp, Os/Posix/TaskId.cpp, Os/TaskIdRepr.hpp, and Svc/CmdSequencer/CmdSequencerImpl.hpp.

Rationale

Without this, we get warnings from GCC and Clang.

Testing/Review Recommendations

None

Future Work

None

This cleans up the GCC/Clang compiler warnings like:

    extra ‘;’ [-Wpedantic] }; // namespace StringUtils
@Joshua-Anderson
Copy link
Collaborator

@myint Were you able to get fprime to compile with -pedantic using gcc? We currently test F' against -pedantic in CI using clang but I wasn't able to get -pendatic working with gcc because I wasn't able to disable a couple specific violations of ISO C++ that F' has. It would be awesome to test -pedantic GCC in CI to prevent regressions and errors like this, so if were able to get pedantic compiling I'd love to know :)

@myint
Copy link
Author

myint commented Feb 9, 2022

@Joshua-Anderson It's a slightly older commit of FPrime (37b4bfe), but @Kronos3 got -pedantic working as part of SSim's FPrime build:

--REMOVED--

With this configuration, we get warnings from GCC (4.8.5). Clang can produce a similar warning about semicolons via -Wextra-semi (but that happens not to be supported in the aforementioned older GCC 4.8.5).

@Joshua-Anderson
Copy link
Collaborator

Joshua-Anderson commented Feb 9, 2022

4.8.5 is a pretty old version of GCC, I suspect it doesn't have the same checks that are failing on newer versions of GCC and that may be why that project isn't having any pedantic warnings. Hmm, it may be worth adding -Wextra-semi to our code quality CI builds to prevent regressions.

@LeStarch LeStarch merged commit 9b33d1f into nasa:devel Feb 9, 2022
@myint myint deleted the myint-clean-semicolon-warnings branch February 9, 2022 21:42
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.

None yet

3 participants