Repository navigation
fix: resolve compilation warnings - #47
Merged
Merged
Conversation
`UTF32` is `unsigned long`, so reading the 4-byte `wchar_t` through
a `UTF32` pointer reads 8 bytes on 64-bit Linux and macOS:
src/common/string_conversion.cc:107:16: error: array subscript 2 is outside array bounds of 'wchar_t [1]' [-Werror=array-bounds=]
Convert the character into a `UTF32` local instead.
- unknown `#pragma warning` in the Windows `exception_handler.h` with MinGW - unused `machine_state` in `MinidumpGenerator::WriteContextARM64()` on macOS
JoshuaMoelans
approved these changes
Nov 20, 2026
jpnurmi
added a commit
to getsentry/sentry-native
that referenced
this pull request
Nov 20, 2026
Bump to the merge commits of getsentry/breakpad#47 and getsentry/crashpad#181.
jpnurmi
added a commit
to getsentry/sentry-native
that referenced
this pull request
Nov 23, 2026
#2315) * build: apply `SENTRY_ERROR_ON_WARNINGS` to breakpad and crashpad Build breakpad with `/W3` on MSVC and `-Wall` elsewhere, and treat breakpad's and crashpad's warnings as errors with `SENTRY_ERROR_ON_WARNINGS`. Bump breakpad and crashpad to fix their warnings. * build: respect `SENTRY_ERROR_ON_WARNINGS` on MSVC Add `/WX` to sentry, crashpad and breakpad when the option is enabled, like `-Werror` on other compilers. * build: suppress the warnings new in clang-cl 21 clang-cl maps `-Wall` to `-Weverything`, so the warnings that clang 21 added fail the `sentry` build with the clang-cl 22.1.3 that ships with Visual Studio 2026. ```text include\sentry.h(955,11): error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword] src\sentry_attachment.c(233,12): error: not eliding copy on return [-Werror,-Wnrvo] src\backends\sentry_backend_inproc.c(147,31): error: padding struct 'struct sentry_inproc_backend_config_s' with 3 bytes to align 'handler_strategy' [-Werror,-Wpadded] ``` * build: bump breakpad and crashpad to the merged warning fixes Bump to the merge commits of getsentry/breakpad#47 and getsentry/crashpad#181. * build: copy the sentry warning options to sentry-crash on MSVC `sentry-crash` copied the warning options from `sentry` only on GCC and Clang, so `SENTRY_ERROR_ON_WARNINGS` did not reach the daemon on MSVC. Ref: #2315 (comment) * ci: add a ClangCL job for VS 2026 Run the ClangCL build and tests on `windows-2025-vs2026` as well, which ships a newer clang-cl than VS 2022. Let CMake pick the installed Visual Studio instead of forcing the VS 2022 generator. * build: respect `SENTRY_ERROR_ON_WARNINGS` on clang-cl clang-cl always built `sentry` with `-Werror`, so each new clang-cl warning broke the build for everyone. Leave it to the `/WX` that `SENTRY_ERROR_ON_WARNINGS` adds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the warnings that sentry-native reports when it builds breakpad with
-Wall(getsentry/sentry-native#2315):GCC 12+:
macOS:
MinGW: