RESOLVED DUPLICATE of bug 162596 162552
-Wformat warnings triggered by BitmapImage::frameImageAtIndex
https://bugs.webkit.org/show_bug.cgi?id=162552
Summary -Wformat warnings triggered by BitmapImage::frameImageAtIndex
Michael Catanzaro
Reported 2016-09-26 01:57:56 PDT
Fix -Wformat warnings triggered by BitmapImage::frameImageAtIndex
Attachments
Patch (2.13 KB, patch)
2016-09-26 02:00 PDT, Michael Catanzaro
darin: review+
commit-queue: commit-queue-
Michael Catanzaro
Comment 1 2016-09-26 01:58:26 PDT
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(&LOG_CHANNEL(channel), __VA_ARGS__) ^ ../../Source/WebCore/platform/graphics/BitmapImage.cpp:351:5: note: in expansion of macro ‘LOG’ LOG(Images, "BitmapImage %p frameImageAtIndex - subsamplingLevel %d at scale %.4f", 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(&LOG_CHANNEL(channel), __VA_ARGS__) ^ ../../Source/WebCore/platform/graphics/BitmapImage.cpp:356:9: note: in expansion of macro ‘LOG’ LOG(Images, " subsamplingLevel was %d, resampling", m_frames[index].subsamplingLevel()); ^~~
Michael Catanzaro
Comment 2 2016-09-26 02:00:53 PDT
Alex Christensen
Comment 3 2016-09-26 08:20:28 PDT
Comment on attachment 289811 [details] Patch Couldn't we just change the %d to %zu?
Michael Catanzaro
Comment 4 2016-09-26 11:43:53 PDT
(In reply to comment #3) > Comment on attachment 289811 [details] > Patch > > Couldn't we just change the %d to %zu? No that doesn't make sense, WebCore::SubsamplingLevel is an enum and it doesn't specify any particular backing data type, so it's an int and %d is the right way to print it.
Michael Catanzaro
Comment 5 2016-10-04 11:35:12 PDT
Ping reviewers
WebKit Commit Bot
Comment 6 2016-10-06 20:24:29 PDT
Comment on attachment 289811 [details] Patch Rejecting attachment 289811 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 289811, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: ]" 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 "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Darin Adler']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/2235068
Michael Catanzaro
Comment 7 2016-10-07 02:35:44 PDT
It's already fixed. *** This bug has been marked as a duplicate of bug 162596 ***
Note You need to log in before you can comment on or make changes to this bug.