WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
297439
Fix -Wpreferred-type-bitfield-enum-conversion warnings in WebCore
https://bugs.webkit.org/show_bug.cgi?id=297439
Summary
Fix -Wpreferred-type-bitfield-enum-conversion warnings in WebCore
David Kilzer (:ddkilzer)
Reported
2025-08-14 17:57:34 PDT
Fix -Wpreferred-type-bitfield-enum-conversion warnings in WebCore. ``` /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/PrivateHeaders/RenderStyle.h:433:99: error: bit-field 'pseudoElementType' is not wide enough to store all enumerators of preferred type 'PseudoId' [-Werror,-Wpreferred-type-bitfield-enum-conversion] 433 | void setPseudoElementType(PseudoId pseudoElementType) { m_nonInheritedFlags.pseudoElementType = static_cast<unsigned>(pseudoElementType); } | ^ /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/PrivateHeaders/RenderStyle.h:2378:63: note: widen this field to 18 bits to store all values of 'PseudoId' 2378 | PREFERRED_TYPE(PseudoId) unsigned pseudoElementType : PseudoElementTypeBits; | ^~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/PrivateHeaders/FillLayer.h:127:42: error: bit-field 'm_origin' is not wide enough to store all enumerators of preferred type 'FillBox' [-Werror,-Wpreferred-type-bitfield-enum-conversion] 127 | void setOrigin(FillBox b) { m_origin = static_cast<unsigned>(b); m_originSet = true; } | ^ /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/PrivateHeaders/FillLayer.h:201:49: note: widen this field to 3 bits to store all values of 'FillBox' 201 | PREFERRED_TYPE(FillBox) unsigned m_origin : 2; | ^ ``` <
rdar://158245532
>
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2025-08-14 18:16:42 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/49434
EWS
Comment 2
2025-08-14 22:01:32 PDT
Committed
298737@main
(5a74e184fd22): <
https://commits.webkit.org/298737@main
> Reviewed commits have been landed. Closing PR #49434 and removing active labels.
David Kilzer (:ddkilzer)
Comment 3
2025-09-15 11:02:34 PDT
Accidentally reverted here: [Style] Replace FillLayer linked list with strong style typed fixed vector <
https://bugs.webkit.org/show_bug.cgi?id=298113
> <
https://commits.webkit.org/299407@main
> Fixing again here:
Bug 298883
: Re-fix -Wpreferred-type-bitfield-enum-conversion warnings in WebCore <
https://bugs.webkit.org/show_bug.cgi?id=298883
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug