Repository navigation
Treat compiler warnings as errors - #286
Open
mattday-etas wants to merge 2 commits into
Open
mattday-etas wants to merge 2 commits into
mattday-etas wants to merge 2 commits into
Conversation
Contributor
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
NEOatNHNG
requested changes
Oct 29, 2026
|
|
||
| # Treat compiler warnings as errors for this repository's own code only | ||
| # (external dependencies are excluded via the path-based regex). | ||
| build --per_file_copt=^score/.*,^examples/.*@-Wall,-Wextra,-Werror |
Contributor
There was a problem hiding this comment.
Shouldn't we use the enforcement from score_cpp_policies?
Contributor
|
Quality pack traceability report for this pull request: Status: PASS (workflow run) |
Contributor
|
Documentation preview for this pull request is available at: |
This branch was successfully deployed
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.
This enables the compiler flags
-Wall,-Wextraand-Werrorfor the code in the time repository. Any warnings produced by external code are still permitted.To enable the change, two small fixes were required for lines producing compiler warnings:
-Wredundant-move(return std::move(data);inverification_stage.h)std::moveis redundant, and it can block that elision.return data;.-Wclass-memaccess(memcpyintoGptpIpcRegionin the test)memcpyonto an object whose type isn't trivially copyable can bypass its copy semantics, so GCC warns. Here, the test deliberately overwrites the first 4 bytes (the magic number) to simulate corruption.void*so GCC sees raw-byte writes, which is what the test intends. Behavior is unchanged.