File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 35
35
36
36
#include < iostream>
37
37
#include < sstream>
38
+ #include " mysql_util.h"
39
+ #ifdef GCC
40
+ #if defined __GNUC__ || __GNUC__ >= 8
41
+ DISABLE_WARNING (-Wparentheses)
38
42
#include < boost/variant.hpp>
39
43
#include < boost/scoped_array.hpp>
40
-
44
+ DIAGNOSTIC_POP
45
+ #endif
41
46
#include < cppconn/exception.h>
42
- #include " mysql_util.h"
43
47
#include " mysql_connection.h"
44
48
#include " mysql_statement.h"
45
49
#include " mysql_prepared_statement.h"
Original file line number Diff line number Diff line change 118
118
(((uint32_t ) (((unsigned char *) (A))[0 ])) << 24 ))) <<\
119
119
32 ))
120
120
121
+ /*
122
+ Macros used to disable warnings for fragments of code.
123
+ */
124
+
125
+ #if defined __GNUC__ || defined __clang__
126
+
127
+ #define PRAGMA (X ) _Pragma (#X)
128
+ #define DISABLE_WARNING (W ) PRAGMA(GCC diagnostic ignored #W)
129
+
130
+ #if defined __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
131
+ #define DIAGNOSTIC_PUSH PRAGMA (GCC diagnostic push)
132
+ #define DIAGNOSTIC_POP PRAGMA (GCC diagnostic pop)
133
+ #else
134
+ #define DIAGNOSTIC_PUSH
135
+ #define DIAGNOSTIC_POP
136
+ #endif
137
+
138
+ #elif defined _MSC_VER
139
+
140
+
141
+ #define PRAGMA (X ) __pragma(X)
142
+ #define DISABLE_WARNING (W ) PRAGMA(warning (disable:W))
143
+
144
+ #define DIAGNOSTIC_PUSH PRAGMA (warning (push))
145
+ #define DIAGNOSTIC_POP PRAGMA (warning (pop))
146
+
147
+ #else
148
+
149
+ #define PRAGMA (X )
150
+ #define DISABLE_WARNING (W )
151
+
152
+ #define DIAGNOSTIC_PUSH
153
+ #define DIAGNOSTIC_POP
154
+
155
+ #endif
156
+
121
157
namespace sql
122
158
{
123
159
namespace mysql
You can’t perform that action at this time.
0 commit comments