summaryrefslogtreecommitdiff
path: root/development/mysql-workbench/fix-build-for-i686.patch
blob: e25411cbc5959ea6fbabecaad3ec564eb1ce0155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From af2bff95077b376a21ba815505589f4ad6b62140 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 7 Feb 2017 23:10:23 +0100
Subject: [PATCH 1/1] fix build for i686

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 library/base/jsonparser.cpp |  6 ++++--
 library/forms/jsonview.cpp  | 12 ++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/library/base/jsonparser.cpp b/library/base/jsonparser.cpp
index 6ed4b3f..fb4e055 100644
--- a/library/base/jsonparser.cpp
+++ b/library/base/jsonparser.cpp
@@ -343,7 +343,7 @@ namespace JsonParser {
    */
   JsonValue &JsonArray::at(SizeType pos) {
     if (pos > _data.size())
-      throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos));
+      throw std::out_of_range(base::strfmt("Index '%zu' is out of range.", pos));
     return _data.at(pos);
   }
 
@@ -358,7 +358,7 @@ namespace JsonParser {
    */
   const JsonValue &JsonArray::at(SizeType pos) const {
     if (pos > _data.size())
-      throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos));
+      throw std::out_of_range(base::strfmt("Index '%zu' is out of range.", pos));
     return _data.at(pos);
   }
 
@@ -1668,12 +1668,14 @@ namespace JsonParser {
       case VDouble:
         _output += std::to_string((double)value);
         break;
+#ifdef DEFINE_UINT64_T_FUNCTIONS
       case VInt64:
         _output += std::to_string((int64_t)value);
         break;
       case VUint64:
         _output += std::to_string((uint64_t)value);
         break;
+#endif
       case VObject:
         write((JsonObject)value);
         break;
-- 
2.11.1