Compiling with mingw-w64 is broken with: error: unknown conversion type character ‘l’ in format

RESOLVED FIXED in Firefox 55

Status

()

Core
JavaScript Engine
RESOLVED FIXED
a year ago
4 months ago

People

(Reporter: Georg Koppen, Assigned: tjr)

Tracking

(Blocks: 1 bug)

52 Branch
mozilla55
All
Windows
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [tor 1331349])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Since bug 553032 landed cross-compiling with mingw-w64 is broken:

/home/firefox/win52/toolchain/mingw-w64/bin/i686-w64-mingw32-g++ -std=gnu++11 -mwindows -o RegExp.o -c   -DNDEBUG=1 -DTRIMMED=1 -D_CRT_RAND_S -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DJS_HAS_CTYPES '-DDLL_PREFIX=""' '-DDLL_SUFFIX=".dll"' -DFFI_BUILDING -DMOZ_HAS_MOZGLUE -I/home/firefox/win52/mozilla-aurora/js/src -I/home/firefox/win52/mozilla-aurora/obj-mingw/js/src -I/home/firefox/win52/mozilla-aurora/obj-mingw/js/src/ctypes/libffi/include -I/home/firefox/win52/mozilla-aurora/js/src/ctypes/libffi/src/x86 -I/home/firefox/win52/mozilla-aurora/obj-mingw/dist/include  -I/home/firefox/win52/mozilla-aurora/obj-mingw/dist/include/nspr          -DMOZILLA_CLIENT -include /home/firefox/win52/mozilla-aurora/obj-mingw/js/src/js-confdefs.h -MD -MP -MF .deps/RegExp.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fomit-frame-pointer  -Wno-shadow -Werror=format  /home/firefox/win52/mozilla-aurora/js/src/builtin/RegExp.cpp
In file included from /home/firefox/win52/mozilla-aurora/js/src/jit/x86/BaseAssembler-x86.h:10:0,
                 from /home/firefox/win52/mozilla-aurora/js/src/jit/x86-shared/Assembler-x86-shared.h:15,
                 from /home/firefox/win52/mozilla-aurora/js/src/jit/x86/Assembler-x86.h:180,
                 from /home/firefox/win52/mozilla-aurora/js/src/jit/x86-shared/MacroAssembler-x86-shared.h:13,
                 from /home/firefox/win52/mozilla-aurora/js/src/jit/x86/MacroAssembler-x86.h:14,
                 from /home/firefox/win52/mozilla-aurora/js/src/jit/MacroAssembler.h:16,
                 from /home/firefox/win52/mozilla-aurora/js/src/jit/BaselineJIT.h:18,
                 from /home/firefox/win52/mozilla-aurora/js/src/vm/TypeInference-inl.h:19,
                 from /home/firefox/win52/mozilla-aurora/js/src/jsobjinlines.h:33,
                 from /home/firefox/win52/mozilla-aurora/js/src/builtin/RegExp.cpp:21:
/home/firefox/win52/mozilla-aurora/js/src/jit/x86-shared/BaseAssembler-x86-shared.h: In member function ‘void js::jit::X86Encoding::BaseAssembler::int64Constant(int64_t)’:
/home/firefox/win52/mozilla-aurora/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:3755:40: error: unknown conversion type character ‘l’ in format [-Werror=format=]
         spew(".quad %lld", (long long)i);
                                        ^
/home/firefox/win52/mozilla-aurora/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:3755:40: error: too many arguments for format [-Werror=format-extra-args]

Comment 1

a year ago
I did some research.

First, this is a known issue with mingw.  Here is an ok description:

https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/

The GCC bug mentions that the decision was that the "printf" format attribute
specifically means "follow the system", while "gnu_printf" means "follow C99 plus
GNU extensions".  (As an aside it seems that a "c99_printf" format attribute would have
been nice.)

Unfortunately we're in the bad situation that we freely mix system- and custom-printf
implementations, and yet we only have one set of defines for things like PRIuSIZE.
What this means is that we can't really declare the various JS printf wrappers as
"gnu_printf", because (I think) this would break code using 

https://dxr.mozilla.org/mozilla-central/rev/88030580b14bb253a55bc174c987a9fa43c3fb55/mfbt/SizePrintfMacros.h#23

There aren't all that many uses of %ll in the tree, so maybe one option is to cast the values
to int64_t or uint64_t as appropriate and use PRImumble64.

Another option might be to take advantage of the minimum size requirement of long long,
assume that in practice it is always just 64 bits (probably true today), and convert the
printf calls without casting the values.  This might work ok; and anyway if it breaks in
the future we'll get errors from the compiler about it.

Do we have a mingw64 cross-build in automation?  Otherwise I'll have to see if I can figure out
how to do one locally.

Comment 2

a year ago
Forgot to link to the gcc bug, which is maybe useful:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37768
(Assignee)

Comment 3

a year ago
(In reply to Tom Tromey :tromey from comment #1)
> Do we have a mingw64 cross-build in automation?  Otherwise I'll have to see
> if I can figure out
> how to do one locally.

Not at this time, although I am working on it over in #1330608.

Comment 4

a year ago
(In reply to Tom Tromey :tromey from comment #1)
> Unfortunately we're in the bad situation that we freely mix system- and
> custom-printf
> implementations, and yet we only have one set of defines for things like
> PRIuSIZE.
> What this means is that we can't really declare the various JS printf
> wrappers as
> "gnu_printf", because (I think) this would break code using 

I would add to this problem that some details about the format differ between C runtimes used (msvcr*.dll). IMHO the best solution is turning off format workings on mingw builds.

Comment 5

a year ago
> IMHO the best solution is turning off format workings on mingw builds.

I'd prefer not to do that.  These checks catch bugs -- generally ones in logging, sure,
but bugs nonetheless.  For example here is a windows-only logging bug that I think
could be a crasher:

https://dxr.mozilla.org/mozilla-central/rev/80eac484366ad881c6a10bf81e8d9b8f7a676c75/toolkit/components/filewatcher/NativeFileWatcherWin.cpp#515

This one would have been caught by a format checker.

I don't think formatting differences are relevant here; just what attribute to apply to what
functions and how to modify the source to do the right thing.
(Assignee)

Updated

a year ago
Assignee: nobody → tom
(Assignee)

Updated

a year ago
Blocks: 1330608
Comment hidden (mozreview-request)
(Assignee)

Updated

a year ago
Attachment #8830057 - Flags: review?(ttromey)

Comment 7

a year ago
mozreview-review
Comment on attachment 8830057 [details]
Bug 1331349 Fix printf formatting errors in MinGW compilation

https://reviewboard.mozilla.org/r/106980/#review108356

This seems reasonable to me and is much simpler than I was anticipating.
I think it could use a comment explaining why ms_print was chosen, perhaps referring to this bug.

That said I don't think I can actually approve a patch here, so I am going to clear the r?
and suggest :froydnj instead.
Attachment #8830057 - Flags: review?(ttromey)

Updated

a year ago
Attachment #8830057 - Flags: review?(nfroyd)

Comment 8

a year ago
mozreview-review
Comment on attachment 8830057 [details]
Bug 1331349 Fix printf formatting errors in MinGW compilation

https://reviewboard.mozilla.org/r/106980/#review108386

I would strongly recommend rechecking this after format checking lands in bug 1060419.

::: mfbt/Attributes.h:620
(Diff revision 1)
> -#ifdef __GNUC__
> +#ifdef __MINGW__
> +#define MOZ_FORMAT_PRINTF(stringIndex, firstToCheck)  \
> +    __attribute__ ((format (ms_printf, stringIndex, firstToCheck)))

Like Tom said, a comment here would be most helpful.
Attachment #8830057 - Flags: review?(nfroyd) → review+
(Assignee)

Updated

a year ago
Depends on: 1344809, 1060419
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Comment 12

a year ago
Okay, so I revisited this patch and changed it up. Nathan, could you please re-review? It's currently stuck in the r+ phase and I can't request a re-review that I know of.

printf vs ms_printf vs gnu_printf.  Firstly, I can confirm that when building on Linux for Windows with mingw printf maps to ms_printf; and that __MINGW_PRINTF_FORMAT maps to gnu_printf. 

The correct choice seems to be gnu_printf, as ms_printf produces copies warnings on the test program, as shown in Appendix A. However executables built with both options ran without crashing (for what it's worth; they weren't compiled with ASAN.)

There are a few other places where this may be needed, but I'm not going to fix them unless the build actually needs it, so we;ll wait and see. 




Appendix A)
Building with ms_printf. To view these I edited mfbt/tests/moz.build to add CXXFLAGS += ['-Wformat']

tom@xeon-t mingw-work/printf » ./mach build mfbt/
 0:00.23 /usr/bin/make -C /home/tom/Documents/moz/mingw-work/printf/obj-mingw -j16 -s backend
 0:00.31 /usr/bin/make -C mfbt -j16 -s
 0:01.20 libmfbt.a.desc
 0:01.74 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintSigned64()’:
 0:01.74 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:73:73: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.74    SprintfLiteral(gOutput, "%" PRId64, int64_t(-INT64_C(432157943248732)));
 0:01.74                                                                          ^
 0:01.74 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:73:73: warning: too many arguments for format [-Wformat-extra-args]
 0:01.74 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:77:69: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.74    SprintfLiteral(gOutput, "%" PRIi64, int64_t(INT64_C(325719232983)));
 0:01.75                                                                      ^
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:77:69: warning: too many arguments for format [-Wformat-extra-args]
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintSignedLeast64()’:
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:130:84: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.75    SprintfLiteral(gOutput, "%" PRIdLEAST64, int_least64_t(-INT64_C(432157943248732)));
 0:01.75                                                                                     ^
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:130:84: warning: too many arguments for format [-Wformat-extra-args]
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:134:80: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.75    SprintfLiteral(gOutput, "%" PRIiLEAST64, int_least64_t(INT64_C(325719232983)));
 0:01.75                                                                                 ^
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:134:80: warning: too many arguments for format [-Wformat-extra-args]
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintSignedFast64()’:
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:187:82: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.75    SprintfLiteral(gOutput, "%" PRIdFAST64, int_fast64_t(-INT64_C(432157943248732)));
 0:01.75                                                                                   ^
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:187:82: warning: too many arguments for format [-Wformat-extra-args]
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:191:78: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.75    SprintfLiteral(gOutput, "%" PRIiFAST64, int_fast64_t(INT64_C(325719232983)));
 0:01.75                                                                               ^
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:191:78: warning: too many arguments for format [-Wformat-extra-args]
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintSignedMax()’:
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:208:76: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.75    SprintfLiteral(gOutput, "%" PRIdMAX, intmax_t(-INTMAX_C(432157943248732)));
 0:01.75                                                                             ^
 0:01.75 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:208:76: warning: too many arguments for format [-Wformat-extra-args]
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:212:72: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.76    SprintfLiteral(gOutput, "%" PRIiMAX, intmax_t(INTMAX_C(325719232983)));
 0:01.76                                                                         ^
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:212:72: warning: too many arguments for format [-Wformat-extra-args]
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintUnsigned64()’:
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:313:72: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.76    SprintfLiteral(gOutput, "%" PRIo64, uint64_t(UINT64_C(0424242424242)));
 0:01.76                                                                         ^
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:313:72: warning: too many arguments for format [-Wformat-extra-args]
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:317:79: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.76    SprintfLiteral(gOutput, "%" PRIu64, uint64_t(UINT64_C(17171717171717171717)));
 0:01.76                                                                                ^
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:317:79: warning: too many arguments for format [-Wformat-extra-args]
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:321:75: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.76    SprintfLiteral(gOutput, "%" PRIx64, uint64_t(UINT64_C(0x2a2a2a2a2a2a2a)));
 0:01.76                                                                            ^
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:321:75: warning: too many arguments for format [-Wformat-extra-args]
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:325:73: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.76    SprintfLiteral(gOutput, "%" PRIX64, uint64_t(UINT64_C(0xCDCDCDCDCDCD)));
 0:01.76                                                                          ^
 0:01.76 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:325:73: warning: too many arguments for format [-Wformat-extra-args]
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintUnsignedLeast64()’:
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:402:83: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.77    SprintfLiteral(gOutput, "%" PRIoLEAST64, uint_least64_t(UINT64_C(0424242424242)));
 0:01.77                                                                                    ^
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:402:83: warning: too many arguments for format [-Wformat-extra-args]
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:407:64: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.77                   uint_least64_t(UINT64_C(17171717171717171717)));
 0:01.77                                                                 ^
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:407:64: warning: too many arguments for format [-Wformat-extra-args]
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:411:86: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.77    SprintfLiteral(gOutput, "%" PRIxLEAST64, uint_least64_t(UINT64_C(0x2a2a2a2a2a2a2a)));
 0:01.77                                                                                       ^
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:411:86: warning: too many arguments for format [-Wformat-extra-args]
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:415:84: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.77    SprintfLiteral(gOutput, "%" PRIXLEAST64, uint_least64_t(UINT64_C(0xCDCDCDCDCDCD)));
 0:01.77                                                                                     ^
 0:01.77 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:415:84: warning: too many arguments for format [-Wformat-extra-args]
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintUnsignedFast64()’:
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:492:81: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.78    SprintfLiteral(gOutput, "%" PRIoFAST64, uint_fast64_t(UINT64_C(0424242424242)));
 0:01.78                                                                                  ^
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:492:81: warning: too many arguments for format [-Wformat-extra-args]
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:497:56: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.78            uint_fast64_t(UINT64_C(17171717171717171717)));
 0:01.78                                                         ^
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:497:56: warning: too many arguments for format [-Wformat-extra-args]
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:501:84: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.78    SprintfLiteral(gOutput, "%" PRIxFAST64, uint_fast64_t(UINT64_C(0x2a2a2a2a2a2a2a)));
 0:01.78                                                                                     ^
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:501:84: warning: too many arguments for format [-Wformat-extra-args]
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:505:82: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.78    SprintfLiteral(gOutput, "%" PRIXFAST64, uint_fast64_t(UINT64_C(0xCDCDCDCDCDCD)));
 0:01.78                                                                                   ^
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:505:82: warning: too many arguments for format [-Wformat-extra-args]
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp: In function ‘void TestPrintUnsignedMax()’:
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:522:77: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.78    SprintfLiteral(gOutput, "%" PRIoMAX, uintmax_t(UINTMAX_C(432157943248732)));
 0:01.78                                                                              ^
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:522:77: warning: too many arguments for format [-Wformat-extra-args]
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:526:74: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.78    SprintfLiteral(gOutput, "%" PRIuMAX, uintmax_t(UINTMAX_C(325719232983)));
 0:01.78                                                                           ^
 0:01.78 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:526:74: warning: too many arguments for format [-Wformat-extra-args]
 0:01.79 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:530:74: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.79    SprintfLiteral(gOutput, "%" PRIxMAX, uintmax_t(UINTMAX_C(327281321873)));
 0:01.79                                                                           ^
 0:01.79 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:530:74: warning: too many arguments for format [-Wformat-extra-args]
 0:01.79 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:534:77: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.79    SprintfLiteral(gOutput, "%" PRIXMAX, uintmax_t(UINTMAX_C(912389523743523)));
 0:01.79                                                                              ^
 0:01.79 /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestIntegerPrintfMacros.cpp:534:77: warning: too many arguments for format [-Wformat-extra-args]
 0:01.83 In file included from /home/tom/Documents/moz/mingw-work/printf/mfbt/tests/TestJSONWriter.cpp:8:0:
 0:01.83 /home/tom/Documents/moz/mingw-work/printf/obj-mingw/dist/include/mozilla/JSONWriter.h: In member function ‘void mozilla::JSONWriter::IntProperty(const char*, int64_t)’:
 0:01.83 /home/tom/Documents/moz/mingw-work/printf/obj-mingw/dist/include/mozilla/JSONWriter.h:392:41: warning: unknown conversion type character ‘l’ in format [-Wformat=]
 0:01.83      SprintfLiteral(buf, "%" PRId64, aInt);
Flags: needinfo?(nfroyd)

Comment 13

a year ago
mozreview-review
Comment on attachment 8830057 [details]
Bug 1331349 Fix printf formatting errors in MinGW compilation

https://reviewboard.mozilla.org/r/106980/#review128684

This looks good, thanks!
Attachment #8830057 - Flags: review+
Flags: needinfo?(nfroyd)
(Assignee)

Updated

a year ago
Keywords: checkin-needed

Comment 14

a year ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/35dfc263aa7b
Fix printf formatting errors in MinGW compilation r=froydnj
Keywords: checkin-needed

Comment 15

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/35dfc263aa7b
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Whiteboard: [tor] → [tor 1331349]
You need to log in before you can comment on or make changes to this bug.