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

C++ Warning fixes, werror on ci, C++17 compliance #2957

Merged
merged 22 commits into from
Aug 15, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Aug 10, 2023

What

  • Fixes Build with warnings as errors on CI for C++ #2903
  • Part of C++ SDK V1 #2919
  • currate warning list for gcc/clang
  • enable warnings as errors on CI, for simplicity it's always active on roundtrip tests
  • enable standard set of warning settings on all C++ targets
  • fix warnings in codegen'ed code and manually written code
  • fix accidental C++20 (should have been caught in theory by warnings but it didn't trigger for unknown reason)

Checklist

@Wumpf Wumpf added 🧑‍💻 dev experience developer experience (excluding CI) 🌊 C++ API C/C++ API specific labels Aug 10, 2023
@Wumpf Wumpf force-pushed the andreas/cpp/warning-fixes-and-ci-werror branch from c251103 to 565f760 Compare August 10, 2023 16:44
@emilk
Copy link
Member

emilk commented Aug 10, 2023

🤨

image

@emilk
Copy link
Member

emilk commented Aug 10, 2023

fix accidental C++20 (should have been caught in theory by warnings but it didn't trigger for unknown reason)

Try -Wc99-extensions

@Wumpf
Copy link
Member Author

Wumpf commented Aug 11, 2023

-Wc99-extensions sadly still didn't catch

        rr_data_row c_data_row {
            .entity_path = entity_path,
            .num_instances = static_cast<uint32_t>(num_instances),
            .num_data_cells = static_cast<uint32_t>(num_data_cells),
            .data_cells = c_data_cells.get(),
        };

but left it in anyways

@Wumpf Wumpf requested a review from emilk August 11, 2023 07:55
@Wumpf Wumpf mentioned this pull request Aug 11, 2023
3 tasks
@Wumpf
Copy link
Member Author

Wumpf commented Aug 11, 2023

Remaining warning happens to be fixed in #2959. Not duplicating it in here, waiting for that instead!

Wumpf added a commit that referenced this pull request Aug 11, 2023
### What

As kindly supplied by a user on Discord. Didn't get to test them myself
yet but makes lot of sense to me regardless.

* Part of #2919
* requires additionally C++20 fixes from #2957
* currently every dependend binary has to know about arrow, should be
fixed as part of #2873

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2959) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2959)
- [Docs
preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp%2Fwindows-fixes/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp%2Fwindows-fixes/examples)
@Wumpf Wumpf force-pushed the andreas/cpp/warning-fixes-and-ci-werror branch from 312d517 to 9c1db7b Compare August 11, 2023 14:58
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always nice to run on as many warnings as possible, especially for unsafe languages

CMakeLists.txt Outdated Show resolved Hide resolved
crates/re_types_builder/src/codegen/cpp/mod.rs Outdated Show resolved Hide resolved
rerun_cpp/src/rerun/recording_stream.hpp Outdated Show resolved Hide resolved
@Wumpf Wumpf force-pushed the andreas/cpp/warning-fixes-and-ci-werror branch from 9c1db7b to b166661 Compare August 15, 2023 08:19
@Wumpf Wumpf merged commit 16635be into main Aug 15, 2023
@Wumpf Wumpf deleted the andreas/cpp/warning-fixes-and-ci-werror branch August 15, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C/C++ API specific 🧑‍💻 dev experience developer experience (excluding CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build with warnings as errors on CI for C++
2 participants