RESOLVED FIXED 258551
Debug build with gcc fails
https://bugs.webkit.org/show_bug.cgi?id=258551
Summary Debug build with gcc fails
Przemyslaw Gorszkowski
Reported 2023-06-27 00:15:53 PDT
This is regression after https://github.com/WebKit/WebKit/commit/fb46eb89ed570c6cab4f55ba8d7b7cd432a99e6b, logs: In file included from /home/pgorszkowski/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/StdLibExtras.h:34, from /home/pgorszkowski/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/FastMalloc.h:26, from /home/pgorszkowski/WebKit/Source/WebCore/config.h:47, from /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWOriginStore.cpp:26, from /home/pgorszkowski/WebKit/WebKitBuild/Debug/WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-8.cpp:1: /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp: In member function ‘void WebCore::SWServerWorker::didFinishInstall(const std::optional<WebCore::ServiceWorkerJobDataIdentifier>&, bool)’: /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp:204:74: error: format ‘%hhu’ expects argument of type ‘int’, but argument 6 has type ‘WebCore::ServiceWorkerState’ [-Werror=format=] 204 | RELEASE_ASSERT_WITH_MESSAGE(state == ServiceWorkerState::Installing, "State is %hhu", state); | ^~~~~~~~~~~~~~~ ~~~~~ | | | WebCore::ServiceWorkerState /home/pgorszkowski/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/Assertions.h:436:99: note: in definition of macro ‘ASSERT_WITH_MESSAGE’ 436 | WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \ | ^~~~~~~~~~~ /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp:204:5: note: in expansion of macro ‘RELEASE_ASSERT_WITH_MESSAGE’ 204 | RELEASE_ASSERT_WITH_MESSAGE(state == ServiceWorkerState::Installing, "State is %hhu", state); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/pgorszkowski/WebKit/WebKitBuild/Debug/WebCore/DerivedSources/unified-sources/UnifiedSource-f74e0903-8.cpp:8: /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp:204:87: note: format string is defined here 204 | RELEASE_ASSERT_WITH_MESSAGE(state == ServiceWorkerState::Installing, "State is %hhu", state); | ~~~^ | | | int /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp: In member function ‘void WebCore::SWServerWorker::didFinishActivation()’: /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp:216:74: error: format ‘%hhu’ expects argument of type ‘int’, but argument 6 has type ‘WebCore::ServiceWorkerState’ [-Werror=format=] 216 | RELEASE_ASSERT_WITH_MESSAGE(state == ServiceWorkerState::Activating, "State is %hhu", state); | ^~~~~~~~~~~~~~~ ~~~~~ | | | WebCore::ServiceWorkerState /home/pgorszkowski/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/Assertions.h:436:99: note: in definition of macro ‘ASSERT_WITH_MESSAGE’ 436 | WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \ | ^~~~~~~~~~~ /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp:216:5: note: in expansion of macro ‘RELEASE_ASSERT_WITH_MESSAGE’ 216 | RELEASE_ASSERT_WITH_MESSAGE(state == ServiceWorkerState::Activating, "State is %hhu", state); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pgorszkowski/WebKit/Source/WebCore/workers/service/server/SWServerWorker.cpp:216:87: note: format string is defined here 216 | RELEASE_ASSERT_WITH_MESSAGE(state == ServiceWorkerState::Activating, "State is %hhu", state); | ~~~^ | | | int cc1plus: all warnings being treated as errors ninja: build stopped: subcommand failed. Seems that simple static_cast<int> solves the problem.
Attachments
Przemyslaw Gorszkowski
Comment 1 2023-06-27 00:32:39 PDT
EWS
Comment 2 2023-06-27 06:13:36 PDT
Committed 265546@main (fbdc29ad3c83): <https://commits.webkit.org/265546@main> Reviewed commits have been landed. Closing PR #15320 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2023-06-27 06:14:18 PDT
Note You need to log in before you can comment on or make changes to this bug.