aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/stubs/WTFStubs.cpp2
-rw-r--r--src/3rdparty/masm/wtf/FilePrintStream.cpp3
-rw-r--r--src/3rdparty/masm/yarr/YarrInterpreter.cpp8
3 files changed, 11 insertions, 2 deletions
diff --git a/src/3rdparty/masm/stubs/WTFStubs.cpp b/src/3rdparty/masm/stubs/WTFStubs.cpp
index b26d10b3ab..f408b355f5 100644
--- a/src/3rdparty/masm/stubs/WTFStubs.cpp
+++ b/src/3rdparty/masm/stubs/WTFStubs.cpp
@@ -66,7 +66,7 @@ uint32_t cryptographicallyRandomNumber()
return 0;
}
-static FilePrintStream* s_dataFile;
+static FilePrintStream* s_dataFile = nullptr;
void setDataFile(FilePrintStream *ps)
{
diff --git a/src/3rdparty/masm/wtf/FilePrintStream.cpp b/src/3rdparty/masm/wtf/FilePrintStream.cpp
index a56b36526e..8ddf8487bd 100644
--- a/src/3rdparty/masm/wtf/FilePrintStream.cpp
+++ b/src/3rdparty/masm/wtf/FilePrintStream.cpp
@@ -39,7 +39,8 @@ FilePrintStream::~FilePrintStream()
{
if (m_adoptionMode == Borrow)
return;
- fclose(m_file);
+ if (m_file)
+ fclose(m_file);
}
std::unique_ptr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)
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(" ");
};