<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [W32] Many warnings about printf format all over the code when building with MinGW"
   href="https://bugs.webkit.org/show_bug.cgi?id=143773#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [W32] Many warnings about printf format all over the code when building with MinGW"
   href="https://bugs.webkit.org/show_bug.cgi?id=143773">bug 143773</a>
              from <span class="vcard"><a class="email" href="mailto:lrn1986&#64;gmail.com" title="LRN &lt;lrn1986&#64;gmail.com&gt;"> <span class="fn">LRN</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=143773#c2">comment #2</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=250820&amp;action=diff" name="attach_250820" title="Change printf format attribute to gnu_printf, MinGW compatibility">attachment 250820</a> <a href="attachment.cgi?id=250820&amp;action=edit" title="Change printf format attribute to gnu_printf, MinGW compatibility">[details]</a></span>
&gt; Change printf format attribute to gnu_printf, MinGW compatibility
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=250820&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=250820&amp;action=review</a>
&gt; 
&gt; &gt; Source/WTF/ChangeLog:7
&gt; &gt; +        &quot;printf&quot; means &quot;gnu_printf&quot; when compiling for non-Windows and means
&gt; &gt; +        &quot;ms_printf&quot; when compiling for Windows. The code, however, does seems to be
&gt; &gt; +        assuming gnu_printf (judging by the use of %z and %l).
&gt; 
&gt; We don’t need to use %z and %l; where do you see those? This patch might
&gt; makes things better for MinGW, but they don’t resolve the problem for
&gt; Windows so I’d prefer to actually tackle that problem.</span >

../webkitgtk-2.4.8/Source/WTF/wtf/FilePrintStream.cpp: In member function 'virtual void WTF::FilePrintStream::vprintf(const char*, va_list)':
../webkitgtk-2.4.8/Source/WTF/wtf/FilePrintStream.cpp:55:37: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     vfprintf(m_file, format, argList);
                                     ^

../webkitgtk-2.4.8/Source/WTF/wtf/PrintStream.cpp: In function 'void WTF::printInternal(WTF::PrintStream&amp;, long long int)':
../webkitgtk-2.4.8/Source/WTF/wtf/PrintStream.cpp:124:29: warning: unknown conversion type character 'l' in format [-Wformat=]
     out.printf(&quot;%lld&quot;, value);
                             ^
../webkitgtk-2.4.8/Source/WTF/wtf/PrintStream.cpp:124:29: warning: too many arguments for format [-Wformat-extra-args]
../webkitgtk-2.4.8/Source/WTF/wtf/PrintStream.cpp: In function 'void WTF::printInternal(WTF::PrintStream&amp;, long long unsigned int)':
../webkitgtk-2.4.8/Source/WTF/wtf/PrintStream.cpp:129:29: warning: unknown conversion type character 'l' in format [-Wformat=]
     out.printf(&quot;%llu&quot;, value);
                             ^
../webkitgtk-2.4.8/Source/WTF/wtf/PrintStream.cpp:129:29: warning: too many arguments for format [-Wformat-extra-args]

../webkitgtk-2.4.8/Source/WTF/wtf/StringPrintStream.cpp: In member function 'virtual void WTF::StringPrintStream::vprintf(const char*, va_list)':
../webkitgtk-2.4.8/Source/WTF/wtf/StringPrintStream.cpp:60:79: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
         vsnprintf(m_buffer + m_next, m_size - m_next, format, firstPassArgList);
                                                                               ^
../webkitgtk-2.4.8/Source/WTF/wtf/StringPrintStream.cpp:73:70: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
         vsnprintf(m_buffer + m_next, m_size - m_next, format, argList);
                                                                      ^
../webkitgtk-2.4.8/Source/WTF/wtf/text/WTFString.cpp: In static member function 'static WTF::String WTF::String::format(const char*, ...)':
../webkitgtk-2.4.8/Source/WTF/wtf/text/WTFString.cpp:463:48: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     int result = vsnprintf(&amp;ch, 1, format, args);
                                                ^
../webkitgtk-2.4.8/Source/WTF/wtf/text/WTFString.cpp:482:57: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     vsnprintf(buffer.data(), buffer.size(), format, args);
                                                         ^

../webkitgtk-2.4.8/Source/WebCore/platform/sql/SQLiteFileSystem.cpp: In static member function 'static WTF::String WebCore::SQLiteFileSystem::getFileNameForNewDatabase(const WTF::String&amp;, const WTF::String&amp;, const WTF::String&amp;, WebCore::SQLiteDatabase*)':
../webkitgtk-2.4.8/Source/WebCore/platform/sql/SQLiteFileSystem.cpp:76:91: warning: unknown conversion type character 'l' in format [-Wformat=]
         fileName = pathByAppendingComponent(dbDir, String::format(&quot;%016&quot; PRIx64 &quot;.db&quot;, seq));
                                                                                           ^
../webkitgtk-2.4.8/Source/WebCore/platform/sql/SQLiteFileSystem.cpp:76:91: warning: too many arguments for format [-Wformat-extra-args]
../webkitgtk-2.4.8/Source/WebCore/platform/sql/SQLiteFileSystem.cpp:79:51: warning: unknown conversion type character 'l' in format [-Wformat=]
     return String::format(&quot;%016&quot; PRIx64 &quot;.db&quot;, seq);
                                                   ^
../webkitgtk-2.4.8/Source/WebCore/platform/sql/SQLiteFileSystem.cpp:79:51: warning: too many arguments for format [-Wformat-extra-args]

../webkitgtk-2.4.8/Source/JavaScriptCore/jsc.cpp: In member function 'JSC::StackVisitor::Status FunctionJSCStackFunctor::operator()(JSC::StackVisitor&amp;)':
../webkitgtk-2.4.8/Source/JavaScriptCore/jsc.cpp:339:108: warning: unknown conversion type character 'z' in format [-Wformat=]
         m_trace.append(String::format(&quot;    %zu   %s\n&quot;, visitor-&gt;index(), visitor-&gt;toString().utf8().data()));
                                                                                                            ^
../webkitgtk-2.4.8/Source/JavaScriptCore/jsc.cpp:339:108: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
../webkitgtk-2.4.8/Source/JavaScriptCore/jsc.cpp:339:108: warning: too many arguments for format [-Wformat-extra-args]

../webkitgtk-2.4.8/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp: In member function 'void WebCore::XMLDocumentParser::error(WebCore::XMLErrors::ErrorType, const char*, va_list)':
../webkitgtk-2.4.8/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:964:46: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     vsnprintf(m, sizeof(m) - 1, message, args);
                                              ^

In file included from ../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp:27:0:
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h: In member function 'void JSC::ARM64Disassembler::A64DOpcode::appendUnsignedImmediate64(uint64_t)':
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:175:42: warning: unknown conversion type character 'l' in format [-Wformat=]
         bufferPrintf(&quot;#0x%llx&quot;, immediate);
                                          ^
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:175:42: warning: too many arguments for format [-Wformat-extra-args]
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h: In member function 'void JSC::ARM64Disassembler::A64DOpcode::appendPCRelativeOffset(uint32_t*, int32_t)':
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:180:74: warning: unknown conversion type character 'l' in format [-Wformat=]
         bufferPrintf(&quot;0x%llx&quot;, reinterpret_cast&lt;uint64_t&gt;(pc + immediate));
                                                                          ^
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:180:74: warning: too many arguments for format [-Wformat-extra-args]
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp: In member function 'void JSC::ARM64Disassembler::A64DOpcode::bufferPrintf(const char*, ...)':
../webkitgtk-2.4.8/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp:162:110: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     m_bufferOffset += vsnprintf(m_formatBuffer + m_bufferOffset, bufferSize - m_bufferOffset, format, argList);
                                                                                                              ^

In file included from ../webkitgtk-2.4.8/Source/JavaScriptCore/tools/CodeProfile.cpp:32:0:
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/ProfileTreeNode.h: In member function 'void JSC::ProfileTreeNode::dumpInternal(unsigned int)':
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/ProfileTreeNode.h:102:89: warning: unknown conversion type character 'l' in format [-Wformat=]
                 static_cast&lt;long long&gt;(entry-&gt;value.count() - entry-&gt;value.childCount()));
                                                                                         ^
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/ProfileTreeNode.h:102:89: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'long long int' [-Wformat=]
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/ProfileTreeNode.h:102:89: warning: unknown conversion type character 'l' in format [-Wformat=]
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/ProfileTreeNode.h:102:89: warning: too many arguments for format [-Wformat-extra-args]
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/CodeProfile.cpp: In member function 'void JSC::CodeProfile::report()':
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/CodeProfile.cpp:183:83: warning: unknown conversion type character 'l' in format [-Wformat=]
     dataLogF(&quot;Total samples: %lld\n&quot;, static_cast&lt;long long&gt;(profile.childCount()));
                                                                                   ^
../webkitgtk-2.4.8/Source/JavaScriptCore/tools/CodeProfile.cpp:183:83: warning: too many arguments for format [-Wformat-extra-args]</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>