Bug 43359

Summary: [Qt] Fix warnings: unknown conversion type character 'l' in format
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: Tools / TestsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED INVALID    
Severity: Normal CC: abarth, andersca, aroben, eric, webkit.review.bot
Priority: P3 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 43191    
Attachments:
Description Flags
proposed fix #1
none
proposed fix #2
none
proposed fix #3 none

Csaba Osztrogonác
Reported 2010-08-02 09:33:44 PDT
Build QtWebKit on Windows with MinGW, there are some "warning: unknown conversion type character 'l' in format": ..\..\..\JavaScriptCore\wtf\text\WTFString.cpp:404:36: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\wtf\text\WTFString.cpp:404:36: warning: too many arguments for format ..\..\..\JavaScriptCore\wtf\text\WTFString.cpp:413:36: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\wtf\text\WTFString.cpp:413:36: warning: too many arguments for format ..\..\..\WebCore\loader\FTPDirectoryParser.cpp:191:47: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\loader\FTPDirectoryParser.cpp:191:47: warning: too many arguments for format ..\..\..\WebCore\platform\sql\SQLiteFileSystem.cpp:76:84: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\platform\sql\SQLiteFileSystem.cpp:76:84: warning: too many arguments for format ..\..\..\WebCore\platform\sql\SQLiteFileSystem.cpp:79:44: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\platform\sql\SQLiteFileSystem.cpp:79:44: warning: too many arguments for format We should use SCN... and PRI... macros from inttypes.h to avoid using %lli, %llu, ...
Attachments
proposed fix #1 (1.57 KB, patch)
2010-08-11 09:20 PDT, Csaba Osztrogonác
no flags
proposed fix #2 (1.37 KB, patch)
2010-08-11 10:13 PDT, Csaba Osztrogonác
no flags
proposed fix #3 (5.04 KB, patch)
2010-08-12 06:52 PDT, Csaba Osztrogonác
no flags
Csaba Osztrogonác
Comment 1 2010-08-11 09:20:02 PDT
Created attachment 64122 [details] proposed fix #1 Fix 4 warnings: JavaScriptCore\wtf\text\WTFString.cpp:404: return String::format("%lli", n); JavaScriptCore\wtf\text\WTFString.cpp:413: return String::format("%llu", n); WebCore\platform\sql\SQLiteFileSystem.cpp:76: fileName = pathByAppendingComponent(dbDir, String::format("%016llx.db", seq)); WebCore\platform\sql\SQLiteFileSystem.cpp:79: return String::format("%016llx.db", seq);
Csaba Osztrogonác
Comment 2 2010-08-11 10:13:38 PDT
Created attachment 64132 [details] proposed fix #2 Fix this warning: ..\..\..\WebCore\loader\FTPDirectoryParser.cpp:191:47: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\loader\FTPDirectoryParser.cpp:191:47: warning: too many arguments for format I prefer PRI and SCN macros defined in inttypes.h, but I can't find any occurance of them in WebKit trunk. Accordingly I propose a fix similar to String::number(...). JavaScriptCore/wtf/text/WTFString.cpp: ... String String::number(long long n) { #if OS(WINDOWS) && !PLATFORM(QT) return String::format("%I64i", n); #else return String::format("%lli", n); #endif } ...
Csaba Osztrogonác
Comment 3 2010-08-12 06:52:09 PDT
Created attachment 64218 [details] proposed fix #3 Fix 6 warnings (Windows - debug mode): ..\..\..\WebCore\platform\sql\SQLiteDatabase.cpp:159: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\platform\sql\SQLiteDatabase.cpp:159: warning: too many arguments for format ..\..\..\WebCore\storage\DatabaseTracker.cpp:689: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\storage\DatabaseTracker.cpp:689: warning: format '%s' expects type 'char*', but argument 5 has type 'long long unsigned int' ..\..\..\WebCore\storage\DatabaseTracker.cpp:689: warning: too many arguments for format ..\..\..\WebCore\loader\icon\IconDatabase.cpp:1313: warning: unknown conversion type character 'z' in format ..\..\..\WebCore\loader\icon\IconDatabase.cpp:1313: warning: too many arguments for format ..\..\..\WebCore\loader\icon\IconDatabase.cpp:1637: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\loader\icon\IconDatabase.cpp:1637: warning: too many arguments for format ..\..\..\WebCore\loader\icon\IconDatabase.cpp:1641: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\loader\icon\IconDatabase.cpp:1641: warning: too many arguments for format ..\..\..\WebCore\platform\graphics\qt\MediaPlayerPrivatePhonon.cpp:537: warning: unknown conversion type character 'l' in format ..\..\..\WebCore\platform\graphics\qt\MediaPlayerPrivatePhonon.cpp:537: warning: too many arguments for format
Antonio Gomes
Comment 4 2010-08-12 12:57:06 PDT
Comment on attachment 64122 [details] proposed fix #1 > @@ -1,3 +1,20 @@ > +2010-08-11 Csaba Osztrogonác <ossy@webkit.org> maybe you could fix you name spell :)
Csaba Osztrogonác
Comment 5 2010-08-12 13:12:09 PDT
(In reply to comment #4) > (From update of attachment 64122 [details]) > > > @@ -1,3 +1,20 @@ > > +2010-08-11 Csaba Osztrogonác <ossy@webkit.org> > > maybe you could fix you name spell :) Bugzilla doesn't like me, but trac would be happy. ;)
Csaba Osztrogonác
Comment 6 2010-08-12 13:13:50 PDT
Adam, could you review "proposed fix #2" and "proposed fix #3" Windows related patches, please?
Csaba Osztrogonác
Comment 7 2010-08-12 13:28:28 PDT
Comment on attachment 64122 [details] proposed fix #1 Clearing flags on attachment: 64122 Committed r65264: <http://trac.webkit.org/changeset/65264>
WebKit Review Bot
Comment 8 2010-08-12 14:30:45 PDT
http://trac.webkit.org/changeset/65264 might have broken SnowLeopard Intel Release (Tests)
Csaba Osztrogonác
Comment 9 2010-08-12 14:33:31 PDT
(In reply to comment #8) > http://trac.webkit.org/changeset/65264 might have broken SnowLeopard Intel Release (Tests) It must be a false positive alarm.
Csaba Osztrogonác
Comment 10 2010-08-16 08:04:30 PDT
Csaba Osztrogonác
Comment 11 2010-08-16 08:31:25 PDT
Csaba Osztrogonác
Comment 12 2010-09-23 09:13:53 PDT
Reopen, because there are more 5 warnings in JavaScriptCore\interpreter\Interpreter.cpp revealed by enabling JSVALUE32_64 on Windows: ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:426: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:426: warning: too many arguments for format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:438: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:438: warning: too many arguments for format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:447: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:447: warning: too many arguments for format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:470: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:470: warning: too many arguments for format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:485: warning: unknown conversion type character 'l' in format ..\..\..\JavaScriptCore\interpreter\Interpreter.cpp:485: warning: too many arguments for format Fix is coming soon.
Note You need to log in before you can comment on or make changes to this bug.