Fix GCC 14 Compilation Warnings#107
Open
pypingou wants to merge 3 commits intoeclipse-score:mainfrom
Open
Conversation
Wraps the intentional use-after-free in DISABLED_PackageFileDataShallReturnsNulloptIfItWorkedOnAlreadyClosedFile with GCC diagnostic pragmas to suppress -Wuse-after-free warning. This test is already disabled and intentionally passes a closed FILE* to test error handling in PackageFileData. The pragmas allow compilation with -Werror=use-after-free while preserving the test's intent. Fixes compilation error: error: pointer 'file' may be used after 'int fclose(FILE*)' [-Werror=use-after-free] Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replaces decltype(&fclose) with a lambda deleter to avoid GCC warning about function attributes being ignored in template argument. Using decltype(&fclose) as a template argument for std::unique_ptr triggers -Werror=ignored-attributes because GCC cannot preserve all function attributes through decltype in this context. The lambda wrapper provides identical functionality without triggering the warning. Fixes compilation error: error: ignoring attributes on template argument 'int (*)(FILE*)' [-Werror=ignored-attributes] Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
Contributor
Author
|
Note, I've added 1 commit to this PR which (almost*) fixes building logging on aarch64 natively
|
Add configuration and feature flags to support aarch64-linux builds for the score_log_bridge Rust/C++ FFI interface. Changes: - Add aarch64-linux config_setting to BUILD file - Include aarch64_linux in preprocessor checks (adapter.cpp, ffi.rs) - Replace unstable Rust features with stable equivalents: * Use explicit array sizes instead of `[T; _]` placeholder * Use `core::str::from_utf8_unchecked` instead of inherent method These changes enable the Rust bridge to compile on aarch64 platforms using stable Ferrocene toolchain without nightly features. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
abdadd1 to
276e999
Compare
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 PR resolves two compilation errors encountered when building with GCC 14 and -Werror enabled.
Changes
decltype(&fclose)with a lambda deleter forstd::unique_ptr<FILE>-Werror=ignored-attributesbecause function attributes cannot be preserved through decltype in template arguments-Werror=use-after-freewhile preserving the test's original intentContext
These warnings were discovered during compilation with GCC 14, which has stricter checks compared to previous versions. Both fixes maintain the existing behavior while satisfying the compiler's requirements.
Notes for Reviewer
Pre-Review Checklist for the PR Author
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Closes #