<?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>270769</bug_id>
          
          <creation_ts>2024-03-10 13:44:25 -0700</creation_ts>
          <short_desc>[JSC] DatePrototype.cpp(337,29): error: &apos;snprintf&apos; will always be truncated; specified size is 28, but format string expands to at least 29 [-Werror,-Wformat-truncation]</short_desc>
          <delta_ts>2024-03-11 13:26:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2019958</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-03-10 13:44:25 -0700</bug_when>
    <thetext>Clang 18.0.1 reports an warning for Windows port.

In file included from C:\w\WebKitBuild\Debug\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-f2e18ffc-8.cpp:1:
C:\PSDEV\wc\Source\JavaScriptCore\runtime/DatePrototype.cpp(337,29): error: &apos;snprintf&apos; will always be truncated; specified size is 28, but format string expands to at least 29 [-Werror,-Wformat-truncation]
  337 |         charactersWritten = snprintf(buffer, sizeof(buffer), &quot;%+07d-%02d-%02dT%02d:%02d:%02d.%03dZ&quot;, gregorianDateTime-&gt;year(), gregorianDateTime-&gt;month() + 1, gregorianDateTime-&gt;monthDay(), gregorianDateTime-&gt;hour(), gregorianDateTime-&gt;minute(), gregorianDateTime-&gt;second(), ms);
      |                             ^
1 error generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019963</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-03-10 14:23:53 -0700</bug_when>
    <thetext>Seems like this issue.

-Wformat-truncation warning size does not agree with the return value from snprintf · Issue #71320 · llvm/llvm-project
https://github.com/llvm/llvm-project/issues/71320</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019966</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-03-10 14:47:36 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/25692</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2020219</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-03-11 13:25:15 -0700</bug_when>
    <thetext>Committed 275926@main (65fd9be34cc1): &lt;https://commits.webkit.org/275926@main&gt;

Reviewed commits have been landed. Closing PR #25692 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2020220</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-03-11 13:26:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/124404812&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>