diff options
author | Haru <haru@dotalux.com> | 2016-04-05 15:20:39 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-04-05 15:25:00 +0200 |
commit | 7199849cd294ca3d2b7d30f59c27fa03412e5812 (patch) | |
tree | 77c2e5ce7a7e5296cd566f9068592b90647de040 /src/common/sql.c | |
parent | 187c0b6b288a6a4267aeb949e054dd8fabde6627 (diff) | |
download | hercules-7199849cd294ca3d2b7d30f59c27fa03412e5812.tar.gz hercules-7199849cd294ca3d2b7d30f59c27fa03412e5812.tar.bz2 hercules-7199849cd294ca3d2b7d30f59c27fa03412e5812.tar.xz hercules-7199849cd294ca3d2b7d30f59c27fa03412e5812.zip |
Disabled some #pragma GCC diagnostic on versions that don't support them
- Fixes compilation on gcc 4.4 for the brave ones who still want to use
it (we recommend gcc 4.7 or newer)
- Removes some warnings about unknown pragmas on MSVC
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/sql.c')
-rw-r--r-- | src/common/sql.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/sql.c b/src/common/sql.c index 65960d8ea..1eae1b29b 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -653,8 +653,8 @@ int SqlStmt_BindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_ if (idx >= self->max_params) return SQL_SUCCESS; // out of range - ignore -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" +PRAGMA_GCC45(GCC diagnostic push) +PRAGMA_GCC45(GCC diagnostic ignored "-Wcast-qual") /* * MySQL uses the same struct with a non-const buffer for both * parameters (input) and columns (output). @@ -662,7 +662,7 @@ int SqlStmt_BindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_ * dropping a const qualifier here. */ return Sql_P_BindSqlDataType(self->params+idx, buffer_type, (void *)buffer, buffer_len, NULL, NULL); -#pragma GCC diagnostic pop +PRAGMA_GCC45(GCC diagnostic pop) } /// Executes the prepared statement. |