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

Fix -Wpedantic violations when included in C++ #715

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

robinlinden
Copy link
Contributor

This fixes a bunch of error: extra ';' [-Werror=pedantic] issues.

To test this without the codebase where I was using zenoh-pico, I added a C++ "example" where I just included zenoh-pico.h and printed the version used like so:

examples/CMakeLists.txt

+if(ZENOH_CXX_EXAMPLES)
+    enable_language(CXX)
+    add_compile_options(-Wall -Wextra -Werror -Wpedantic)
+    add_example(compilation cpp/compilation.cpp)
+endif()

examples/cpp/compilation.cpp

#include <zenoh-pico.h>

#include <iostream>

int main() {
    std::cout << "Compiled with Zenoh-Pico version: " << ZENOH_PICO << '\n';
}

Copy link

github-actions bot commented Oct 7, 2024

PR missing one of the required labels: {'breaking-change', 'enhancement', 'bug', 'new feature', 'internal', 'dependencies', 'documentation'}

Copy link

github-actions bot commented Oct 7, 2024

PR missing one of the required labels: {'documentation', 'breaking-change', 'dependencies', 'enhancement', 'bug', 'internal', 'new feature'}

This fixes a bunch of `error: extra ';' [-Werror=pedantic]` issues.

Signed-off-by: Robin Linden <_@robinlinden.eu>
Copy link

github-actions bot commented Oct 7, 2024

PR missing one of the required labels: {'enhancement', 'breaking-change', 'new feature', 'bug', 'documentation', 'dependencies', 'internal'}

@jean-roland jean-roland added the bug Something isn't working label Oct 7, 2024
@milyin milyin merged commit 7b54302 into eclipse-zenoh:main Oct 8, 2024
53 of 55 checks passed
@robinlinden robinlinden deleted the pedantic-cplusplus branch October 8, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants