<?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>162552</bug_id>
          
          <creation_ts>2016-09-26 01:57:56 -0700</creation_ts>
          <short_desc>-Wformat warnings triggered by BitmapImage::frameImageAtIndex</short_desc>
          <delta_ts>2016-10-07 02:35:44 -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>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>162596</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1233344</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 01:57:56 -0700</bug_when>
    <thetext>Fix -Wformat warnings triggered by BitmapImage::frameImageAtIndex</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233345</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 01:58:26 -0700</bug_when>
    <thetext>Should probably include the warning here:

[3923/6045] Building CXX object Source...ir/platform/graphics/BitmapImage.cpp.o
In file included from ../../Source/WTF/wtf/StdLibExtras.h:33:0,
                 from ../../Source/WTF/wtf/FastMalloc.h:26,
                 from ../../Source/WebCore/config.h:75,
                 from ../../Source/WebCore/platform/graphics/BitmapImage.cpp:27:
../../Source/WebCore/platform/graphics/BitmapImage.cpp: In member function ‘WebCore::NativeImagePtr WebCore::BitmapImage::frameImageAtIndex(size_t, float)’:
../../Source/WTF/wtf/Assertions.h:394:68: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘WebCore::SubsamplingLevel’ [-Wformat=]
 #define LOG(channel, ...) WTFLog(&amp;LOG_CHANNEL(channel), __VA_ARGS__)
                                                                    ^
../../Source/WebCore/platform/graphics/BitmapImage.cpp:351:5: note: in expansion of macro ‘LOG’
     LOG(Images, &quot;BitmapImage %p frameImageAtIndex - subsamplingLevel %d at scale %.4f&quot;, this, subsamplingLevel, presentationScaleHint);
     ^~~
../../Source/WTF/wtf/Assertions.h:394:68: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘WebCore::SubsamplingLevel’ [-Wformat=]
 #define LOG(channel, ...) WTFLog(&amp;LOG_CHANNEL(channel), __VA_ARGS__)
                                                                    ^
../../Source/WebCore/platform/graphics/BitmapImage.cpp:356:9: note: in expansion of macro ‘LOG’
         LOG(Images, &quot;  subsamplingLevel was %d, resampling&quot;, m_frames[index].subsamplingLevel());
         ^~~</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233346</commentid>
    <comment_count>2</comment_count>
      <attachid>289811</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 02:00:53 -0700</bug_when>
    <thetext>Created attachment 289811
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233411</commentid>
    <comment_count>3</comment_count>
      <attachid>289811</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-09-26 08:20:28 -0700</bug_when>
    <thetext>Comment on attachment 289811
Patch

Couldn&apos;t we just change the %d to %zu?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233484</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 11:43:53 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Comment on attachment 289811 [details]
&gt; Patch
&gt; 
&gt; Couldn&apos;t we just change the %d to %zu?

No that doesn&apos;t make sense, WebCore::SubsamplingLevel is an enum and it doesn&apos;t specify any particular backing data type, so it&apos;s an int and %d is the right way to print it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1236284</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-10-04 11:35:12 -0700</bug_when>
    <thetext>Ping reviewers</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1237444</commentid>
    <comment_count>6</comment_count>
      <attachid>289811</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-10-06 20:24:29 -0700</bug_when>
    <thetext>Comment on attachment 289811
Patch

Rejecting attachment 289811 from commit-queue.

Failed to run &quot;[&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=webkit-queues.webkit.org&apos;, &apos;--bot-id=webkit-cq-02&apos;, &apos;apply-attachment&apos;, &apos;--no-update&apos;, &apos;--non-interactive&apos;, 289811, &apos;--port=mac&apos;]&quot; exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
]&quot; exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 2 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/platform/graphics/BitmapImage.cpp
Hunk #1 FAILED at 348.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/platform/graphics/BitmapImage.cpp.rej

Failed to run &quot;[u&apos;/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply&apos;, &apos;--force&apos;, &apos;--reviewer&apos;, u&apos;Darin Adler&apos;]&quot; exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/2235068</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1237541</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-10-07 02:35:44 -0700</bug_when>
    <thetext>It&apos;s already fixed.

*** This bug has been marked as a duplicate of bug 162596 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>289811</attachid>
            <date>2016-09-26 02:00:53 -0700</date>
            <delta_ts>2016-10-06 20:24:29 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-162552-20160926105756.patch</filename>
            <type>text/plain</type>
            <size>2180</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjA2MzYyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZTIyMDc5YzI3Y2YyMzQw
ZWQxOTMyNGUwMmNlZTY0MDU0ODcxYzhmNS4uMjBkMDJhYTE5OTE1MWQzMmRjNzk2NGRiYzAzMzMy
ODJjNzMwZWI4YSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE1IEBACisyMDE2LTA5LTI2ICBNaWNo
YWVsIENhdGFuemFybyAgPG1jYXRhbnphcm9AaWdhbGlhLmNvbT4KKworICAgICAgICAtV2Zvcm1h
dCB3YXJuaW5ncyB0cmlnZ2VyZWQgYnkgQml0bWFwSW1hZ2U6OmZyYW1lSW1hZ2VBdEluZGV4Cisg
ICAgICAgIGh0dHBzOi8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q8aW50PihtX2Zy
YW1lc1tpbmRleF0uc3Vic2FtcGxpbmdMZXZlbCgpKSk7CiAKICAgICAgICAgLy8gSWYgdGhlIGlt
YWdlIGlzIGFscmVhZHkgY2FjaGVkLCBidXQgYXQgdG9vIHNtYWxsIGEgc2l6ZSwgcmUtZGVjb2Rl
IGEgbGFyZ2VyIHZlcnNpb24uCiAgICAgICAgIGludCBzaXplQ2hhbmdlID0gLW1fZnJhbWVzW2lu
ZGV4XS5jbGVhcigpOwo=
</data>
<flag name="review"
          id="312989"
          type_id="1"
          status="+"
          setter="darin"
    />
    <flag name="commit-queue"
          id="313025"
          type_id="3"
          status="-"
          setter="commit-queue"
    />
          </attachment>
      

    </bug>

</bugzilla>