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
250684
[ANGLE] Fix -Wsign-compare warnings on watchOS
https://bugs.webkit.org/show_bug.cgi?id=250684
Summary
[ANGLE] Fix -Wsign-compare warnings on watchOS
David Kilzer (:ddkilzer)
Reported
2023-01-16 09:33:36 PST
Fix -Wsign-compare warnings on watchOS. On watchOS, 'GLintptr' is defined as 'long', so comparing to 'std::numeric_limits<uint32_t>::max()' results in a signed/unsigned comparison: /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm:1095:57: error: comparison of integers of different signs: 'GLintptr' (aka 'long') and 'std::numeric_limits<unsigned int>::type' (aka 'unsigned int') [-Werror,-Wsign-compare] ANGLE_CHECK_GL_MATH(contextMtl, binding.getOffset() <= std::numeric_limits<uint32_t>::max()); ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm:10: In file included from src/libANGLE/renderer/metal/VertexArrayMtl.h:13: In file included from src/libANGLE/renderer/VertexArrayImpl.h:12: src/common/angleutils.h:470:26: note: expanded from macro 'ANGLE_CHECK_GL_MATH' ANGLE_CHECK(context, result, "Integer overflow.", GL_INVALID_OPERATION) ^~~~~~ In file included from /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm:10: In file included from src/libANGLE/renderer/metal/VertexArrayMtl.h:13: In file included from src/libANGLE/renderer/VertexArrayImpl.h:13: In file included from src/libANGLE/Buffer.h:16: In file included from src/libANGLE/Debug.h:16: src/libANGLE/Error.h:153:30: note: expanded from macro 'ANGLE_CHECK' if (ANGLE_UNLIKELY(!(EXPR))) \ ^~~~ In file included from /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm:10: In file included from src/libANGLE/renderer/metal/VertexArrayMtl.h:13: In file included from src/libANGLE/renderer/VertexArrayImpl.h:12: In file included from src/common/angleutils.h:12: src/common/platform.h:123:55: note: expanded from macro 'ANGLE_UNLIKELY' # define ANGLE_UNLIKELY(x) __builtin_expect(!!(x), 0) ^
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-01-16 09:33:53 PST
<
rdar://problem/104301662
>
David Kilzer (:ddkilzer)
Comment 2
2023-01-16 09:57:25 PST
Pull request:
https://github.com/WebKit/WebKit/pull/8699
David Kilzer (:ddkilzer)
Comment 3
2023-01-16 10:06:18 PST
Another issue: /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/FrameBufferMtl.mm:1658:57: error: comparison of integers of different signs: 'const ptrdiff_t' (aka 'const long') and 'std::numeric_limits<unsigned int>::type' (aka 'unsigned int') [-Werror,-Wsign-compare] ANGLE_MTL_CHECK(contextMtl, packPixelsParams.offset <= std::numeric_limits<uint32_t>::max(), ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/FrameBufferMtl.mm:11: In file included from src/libANGLE/renderer/metal/ContextMtl.h:19: In file included from src/libANGLE/renderer/metal/ProvokingVertexHelper.h:16: In file included from src/libANGLE/renderer/metal/DisplayMtl.h:16: In file included from src/libANGLE/renderer/metal/mtl_command_buffer.h:27: src/libANGLE/renderer/metal/mtl_common.h:564:30: note: expanded from macro 'ANGLE_MTL_CHECK' if (ANGLE_UNLIKELY(!(test))) \ ^~~~ In file included from /Volumes/Data/worker/watchOS-9-Build-EWS/build/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/FrameBufferMtl.mm:10: In file included from src/libANGLE/angletypes.h:13: In file included from src/common/FixedVector.h:13: In file included from src/common/debug.h:22: In file included from src/common/angleutils.h:12: src/common/platform.h:123:55: note: expanded from macro 'ANGLE_UNLIKELY' # define ANGLE_UNLIKELY(x) __builtin_expect(!!(x), 0) ^
EWS
Comment 4
2023-01-29 21:33:24 PST
Committed
259542@main
(076b5adb1937): <
https://commits.webkit.org/259542@main
> Reviewed commits have been landed. Closing PR #8699 and removing active labels.
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