Looking over a 32-bit build log from Debian, to check for potential issues with 32-bit build: /<<PKGBUILDDIR>>/Source/WebCore/PAL/pal/FileSizeFormatter.cpp: In function 'WTF::String fileSizeDescription(uint64_t)': /<<PKGBUILDDIR>>/Source/WebCore/PAL/pal/FileSizeFormatter.cpp:36:31: warning: format '%tu' expects argument of type 'unsigned ptrdiff_t', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] return String::format("%tu bytes", size); ^~~~~~~~~~~ ~~~~ In file included from /<<PKGBUILDDIR>>/obj-i686-linux-gnu/DerivedSources/WebCore/unified-sources/UnifiedSource291.cpp:1: /<<PKGBUILDDIR>>/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp: In function 'WTF::String WebCore::formatByteNumber(size_t)': /<<PKGBUILDDIR>>/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp:59:27: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] return String::format("%lu", number); ^~~~~ ~~~~~~ In file included from /<<PKGBUILDDIR>>/obj-i686-linux-gnu/DerivedSources/WebCore/unified-sources/UnifiedSource300.cpp:5: /<<PKGBUILDDIR>>/Source/WebCore/platform/SharedBuffer.cpp: In member function 'WTF::RefPtr<JSC::ArrayBuffer> WebCore::SharedBuffer::tryCreateArrayBuffer() const': /<<PKGBUILDDIR>>/Source/WebCore/platform/SharedBuffer.cpp:124:22: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] WTFLogAlways("SharedBuffer::tryCreateArrayBuffer Unable to create buffer. Requested size was %zu x %lu\n", size(), sizeof(char)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(In reply to Michael Catanzaro from comment #0) > Looking over a 32-bit build log from Debian, to check for potential issues > with 32-bit build: > > /<<PKGBUILDDIR>>/Source/WebCore/PAL/pal/FileSizeFormatter.cpp: In function > 'WTF::String fileSizeDescription(uint64_t)': > /<<PKGBUILDDIR>>/Source/WebCore/PAL/pal/FileSizeFormatter.cpp:36:31: > warning: format '%tu' expects argument of type 'unsigned ptrdiff_t', but > argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=] > return String::format("%tu bytes", size); > ^~~~~~~~~~~ ~~~~ This one's already fixed (probably by Darin).
(In reply to Michael Catanzaro from comment #0) > In file included from > /<<PKGBUILDDIR>>/obj-i686-linux-gnu/DerivedSources/WebCore/unified-sources/ > UnifiedSource291.cpp:1: > /<<PKGBUILDDIR>>/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp: In > function 'WTF::String WebCore::formatByteNumber(size_t)': > /<<PKGBUILDDIR>>/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp:59: > 27: warning: format '%lu' expects argument of type 'long unsigned int', but > argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] > return String::format("%lu", number); > ^~~~~ ~~~~~~ Ditto
Created attachment 362903 [details] Patch
Comment on attachment 362903 [details] Patch This seems fine. if we did need to log the result of sizeof there are three traditional fixes: 1) add a type cast to some known type 2) put in a local variable or constant of a known type 3) stringify the constant into the literal directly rather than using printf formatting to insert it
Comment on attachment 362903 [details] Patch Clearing flags on attachment: 362903 Committed r242327: <https://trac.webkit.org/changeset/242327>
All reviewed patches have been landed. Closing bug.