Summary: | -Wformat warnings triggered by BitmapImage::frameImageAtIndex | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
Component: | WebCore Misc. | Assignee: | Michael Catanzaro <mcatanzaro> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Minor | CC: | cgarcia, commit-queue, mcatanzaro | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Attachments: |
|
Description
Michael Catanzaro
2016-09-26 01:57:56 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()); ^~~ Created attachment 289811 [details]
Patch
Comment on attachment 289811 [details]
Patch
Couldn't we just change the %d to %zu?
(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. Ping reviewers 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 It's already fixed. *** This bug has been marked as a duplicate of bug 162596 *** |