<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>267207</bug_id>
          
          <creation_ts>2024-01-07 09:00:12 -0800</creation_ts>
          <short_desc>Fix warnings found by compiling with -Wformat in open source clang-17</short_desc>
          <delta_ts>2024-02-15 14:05:43 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=267387</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=269508</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2003490</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2024-01-07 09:00:12 -0800</bug_when>
    <thetext>Fix warnings found by compiling with -Wformat in open source clang-17.


Examples:


Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp:508:79: error: format specifies type &apos;unsigned char&apos; but the argument has type &apos;ExceptionCode&apos; [-Werror,-Wformat]
  508 |                 RELEASE_LOG_ERROR(WebRTC, &quot;Adding ice candidate failed %hhu&quot;, result.exception().code());
      |                                                                        ~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                               static_cast&lt;uint8_t&gt;(    )


Source/WebCore/platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:174:168: error: format specifies type &apos;int&apos; but the argument has type &apos;Profile&apos; [-Werror,-Wformat]
  174 |         RELEASE_LOG_ERROR(MediaStream, &quot;VideoSampleBufferCompressor VTSessionSetProperty kVTCompressionPropertyKey_ProfileLevel failed with %d for profile %d&quot;, error, m_profile);
      |                                                                                                                                                            ~~          ^~~~~~~~~
      |                                                                                                                                                                        static_cast&lt;int&gt;( )


Source/WebCore/workers/service/server/SWServer.cpp:1654:131: error: format specifies type &apos;unsigned char&apos; but the argument has type &apos;ServiceWorkerState&apos; [-Werror,-Wformat]
 1654 |     RELEASE_LOG(ServiceWorker, &quot;SWServer::fireFunctionalEvent serviceWorkerID=%llu, state=%hhu&quot;, worker-&gt;identifier().toUInt64(), worker-&gt;state());
      |                                                                                           ~~~~                                    ^~~~~~~~~~~~~~~
      |                                                                                                                                   static_cast&lt;uint8_t&gt;( )


Source/WebCore/workers/service/ServiceWorker.cpp:72:85: error: format specifies type &apos;unsigned char&apos; but the argument has type &apos;ServiceWorkerState&apos; [-Werror,-Wformat]
   72 |     WORKER_RELEASE_LOG(&quot;serviceWorkerID=%llu, state=%hhu&quot;, identifier().toUInt64(), m_data.state);
      |                                                     ~~~~                            ^~~~~~~~~~~~
      |                                                                                     static_cast&lt;uint8_t&gt;( )

Source/WebCore/workers/service/ServiceWorker.cpp:83:139: error: format specifies type &apos;unsigned char&apos; but the argument has type &apos;ServiceWorkerState&apos; [-Werror,-Wformat]
   83 |     WORKER_RELEASE_LOG(&quot;updateState: Updating service worker %llu state from %hhu to %hhu. registrationID=%llu&quot;, identifier().toUInt64(), m_data.state, state, registrationIdentifier().toUInt64());
      |                                                                              ~~~~                                                         ^~~~~~~~~~~~
      |                                                                                                                                           static_cast&lt;uint8_t&gt;( )

Source/WebCore/workers/service/ServiceWorker.cpp:83:153: error: format specifies type &apos;unsigned char&apos; but the argument has type &apos;State&apos; (aka &apos;WebCore::ServiceWorkerState&apos;) [-Werror,-Wformat]
   83 |     WORKER_RELEASE_LOG(&quot;updateState: Updating service worker %llu state from %hhu to %hhu. registrationID=%llu&quot;, identifier().toUInt64(), m_data.state, state, registrationIdentifier().toUInt64());
      |                                                                                      ~~~~                                                               ^~~~~
      |                                                                                                                                                         static_cast&lt;uint8_t&gt;( )


Source/WebCore/platform/graphics/cocoa/IOSurface.mm:252:128: error: format specifies type &apos;int&apos; but the argument has type &apos;Format&apos; [-Werror,-Wformat]
  252 |         RELEASE_LOG_ERROR(Layers, &quot;IOSurface creation failed for size: (%d %d) and format: (%d)&quot;, size.width(), size.height(), format);
      |                                                                                             ~~                                 ^~~~~~
      |                                                                                                                                static_cast&lt;int&gt;( )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003491</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-01-07 09:00:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/120610377&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003492</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2024-01-07 09:04:04 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/22489</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003506</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-01-07 12:51:36 -0800</bug_when>
    <thetext>Committed 272748@main (a221cbe6bf04): &lt;https://commits.webkit.org/272748@main&gt;

Reviewed commits have been landed. Closing PR #22489 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003902</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2024-01-09 12:42:16 -0800</bug_when>
    <thetext>Re-opening for pull request https://github.com/WebKit/WebKit/pull/22551</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003917</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-01-09 13:35:25 -0800</bug_when>
    <thetext>Committed 272826@main (d0259b024eaa): &lt;https://commits.webkit.org/272826@main&gt;

Reviewed commits have been landed. Closing PR #22551 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>