Fix alignment mismatch warning#754
Open
jschwe wants to merge 1 commit into
Open
Conversation
During the ESR 128 upgrade this patch was added to fix an issue with the generated bindings. The problem doesn't seem to exist anymore and removing the patch seems to work just fine and fixes a clang warning about mismatching alignment. ``` warning: mozjs_sys@140.11.0-0: /Users/runner/work/mozjs/mozjs/target/debug/build/mozjs_sys-ef4f07daefa91c0c/out/build/dist/include/js/ColumnNumber.h:325:12: warning: passing 1-byte aligned argument to 4-byte aligned parameter 'this' of 'MaybeLimitedColumnNumber' may result in an unaligned pointer access [-Walign-mismatch] warning: mozjs_sys@140.11.0-0: 325 | return ColumnNumberOneOrigin(value + 1); warning: mozjs_sys@140.11.0-0: | ^ warning: mozjs_sys@140.11.0-0: ./src/jsapi.cpp:321:7: warning: passing 1-byte aligned argument to 4-byte aligned parameter 'this' of 'MaybeLimitedColumnNumber' may result in an unaligned pointer access [-Walign-mismatch] warning: mozjs_sys@140.11.0-0: 321 | JS::ColumnNumberOneOrigin(columnNumber), report, message, warning: mozjs_sys@140.11.0-0: | ^ ``` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
131b61f to
1999704
Compare
jdm
approved these changes
Jun 11, 2026
Member
|
Mmm, still appears to be necessary on some platforms: |
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.
During the ESR 128 upgrade this patch was added to fix an issue with the generated bindings.
The problem doesn't seem to exist anymore and removing the patch seems to work just fine and fixes a clang warning about mismatching alignment.
Testing: Should be covered by a full servo try run
Servo PR: pending