<?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>213972</bug_id>
          
          <creation_ts>2020-07-05 05:32:32 -0700</creation_ts>
          <short_desc>[WTF] Implicit int to float conversion warning with clang 14</short_desc>
          <delta_ts>2022-07-01 02:48:49 -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>Web Template Framework</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=204834</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe Normand">pnormand</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annulen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>fujii</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1668886</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2020-07-05 05:32:32 -0700</bug_when>
    <thetext>DerivedSources/ForwardingHeaders/wtf/CheckedArithmetic.h:829:58: warning: implicit conversion from &apos;unsigned long&apos; to &apos;double&apos; changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-int-float-conversion]
        if (!(std::numeric_limits&lt;T&gt;::min() &lt;= result &amp;&amp; std::numeric_limits&lt;T&gt;::max() &gt;= result))
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
../Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:511:10: note: in instantiation of member function &apos;WTF::Checked&lt;unsigned long, WTF::RecordOverflow&gt;::operator/=&apos; requested here
    size /= 10.5;
         ^
1 warning generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1668887</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2020-07-05 05:33:38 -0700</bug_when>
    <thetext>Another one:

In file included from DerivedSources/WebCore/StyleBuilderGenerated.cpp:10:
../Source/WebCore/style/StyleBuilderConverter.h:1197:97: warning: implicit conversion from &apos;const int&apos; to &apos;float&apos; changes value from 33554429 to 33554428 [-Wimplicit-int-float-conversion]
        wordSpacing = Length(clampTo&lt;float&gt;(primitiveValue.doubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
                             ~~~~~~~                                                            ^~~~~~~~~~~~~~~~~~~~
1 warning generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1751459</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2021-04-17 13:36:18 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #1)
&gt; Another one:
&gt; 
&gt; In file included from DerivedSources/WebCore/StyleBuilderGenerated.cpp:10:
&gt; ../Source/WebCore/style/StyleBuilderConverter.h:1197:97: warning: implicit
&gt; conversion from &apos;const int&apos; to &apos;float&apos; changes value from 33554429 to
&gt; 33554428 [-Wimplicit-int-float-conversion]
&gt;         wordSpacing = Length(clampTo&lt;float&gt;(primitiveValue.doubleValue(),
&gt; minValueForCssLength, maxValueForCssLength), Percent);
&gt;                              ~~~~~~~                                        
&gt; ^~~~~~~~~~~~~~~~~~~~
&gt; 1 warning generated.

This was fixed by r276205.
Bug 224714 – [clang 11] Remove warning when converting WebCore::maxValueForCssLength from int to float</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879599</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-06-30 16:57:56 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 224714 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879700</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2022-07-01 02:48:40 -0700</bug_when>
    <thetext>In file included from /app/webkit/WebKitBuild/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-12.cpp:8:
/app/webkit/Source/WebCore/platform/audio/AudioUtilities.cpp:72:18: warning: implicit conversion from &apos;unsigned long&apos; to &apos;double&apos; changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
    if (frame &gt;= std::numeric_limits&lt;size_t&gt;::max())
              ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[1277/2105] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-043dd90b-22.cpp.o
In file included from /app/webkit/WebKitBuild/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-043dd90b-22.cpp:5:
/app/webkit/Source/WebCore/rendering/style/RenderStyle.cpp:2048:55: warning: implicit conversion from &apos;const int&apos; to &apos;float&apos; changes value from 33554429 to 33554428 [-Wimplicit-const-int-float-conversion]
        fontWordSpacing = value.nonNanCalculatedValue(maxValueForCssLength);
                                ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~
1 warning generated.
[1339/2105] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-26ec8d00-3.cpp.o
In file included from /app/webkit/WebKitBuild/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-26ec8d00-3.cpp:2:
/app/webkit/Source/WebCore/style/RuleSetBuilder.cpp:227:58: warning: implicit conversion from &apos;unsigned long long&apos; to &apos;double&apos; changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
            unsigned long long random = randomNumber() * std::numeric_limits&lt;unsigned long long&gt;::max();
                                                       ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>