[webkit-changes] [WebKit/WebKit] 190a52: ProcessThrottler.cpp: error: format specifies type...

Commit Queue noreply at github.com
Tue Jul 18 15:22:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 190a527ae2a55efa6b8727dc044411fd78ed9759
      https://github.com/WebKit/WebKit/commit/190a527ae2a55efa6b8727dc044411fd78ed9759
  Author: David Kilzer <ddkilzer at apple.com>
  Date:   2023-07-18 (Tue, 18 Jul 2023)

  Changed paths:
    M Source/WebKit/UIProcess/ProcessAssertion.h
    M Source/WebKit/UIProcess/ProcessThrottler.cpp

  Log Message:
  -----------
  ProcessThrottler.cpp: error: format specifies type 'unsigned int' but the argument has type 'ProcessAssertionType' [-Werror,-Wformat]
https://bugs.webkit.org/show_bug.cgi?id=259314
<rdar://111551983>

Reviewed by Chris Dumez.

* Source/WebKit/UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertionType): Make enum class use uint8_t.

* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::setThrottleState):
- Use WTF::enumToUnderlyingType() to convert the enum value to its
  underlying type for logging to fix the compiler error.

Canonical link: https://commits.webkit.org/266142@main




More information about the webkit-changes mailing list