aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-11-06 13:35:56 +0100
committerLiang Qi <liang.qi@qt.io>2018-11-13 08:58:17 +0000
commitdcf41b5f69d0e199d0a6a8faaad981f73e1c9aa0 (patch)
treef028c9c26bca68dccb919ef0e376ca04d7bc516d /src/3rdparty
parent4651aecaee320b74b6ffcb6fe34fc3d43726010e (diff)
Yarr: Fix developer build with MinGW 64
Use the MinGW/Windows runtime specific printf formats for size_t, formats, fixing: 3rdparty\masm\yarr\YarrInterpreter.cpp: In lambda function: 3rdparty\masm\yarr\YarrInterpreter.cpp:2128:24: error: unknown conversion type character 'z' in format [-Werror=format=] out.printf("%4zu", index); ^~~~~~ 3rdparty\masm\yarr\YarrInterpreter.cpp:2128:24: error: too many arguments for format [-Werror=format-extra-args] cc1plus.exe: all warnings being treated as errors Change-Id: I9d39c51b907fc7834aaf353dd0ce8095852f9b3e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/yarr/YarrInterpreter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/3rdparty/masm/yarr/YarrInterpreter.cpp b/src/3rdparty/masm/yarr/YarrInterpreter.cpp
index 6eb6750dc4..4d3652fcbc 100644
--- a/src/3rdparty/masm/yarr/YarrInterpreter.cpp
+++ b/src/3rdparty/masm/yarr/YarrInterpreter.cpp
@@ -2125,7 +2125,15 @@ public:
auto outputTermIndexAndNest = [&](size_t index, unsigned termNesting) {
for (unsigned nestingDepth = 0; nestingDepth < termIndexNest; nestingDepth++)
out.print(" ");
+#if defined(WIN32) && defined(__MINGW32__)
+# if __SIZEOF_POINTER__ == 8
+ out.printf("%4I64u", index);
+# else
+ out.printf("%4I32u", index);
+# endif
+#else
out.printf("%4zu", index);
+#endif
for (unsigned nestingDepth = 0; nestingDepth < termNesting; nestingDepth++)
out.print(" ");
};