Skip to content

Commit 9376d71

Browse files
author
Daniel Blanchard
committed
Bug#31820147: FIX MSVC C4275 WARNINGS
Suppress the C4275 warnings at the specific points in the source where they are currently generated when building on Windows. RB: 25043
1 parent 23a495d commit 9376d71

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

router/src/harness/include/keyring/master_key_file.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2019, 2020 Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -31,13 +31,17 @@
3131
#include <vector>
3232

3333
#include "harness_export.h"
34+
#include "my_compiler.h"
3435

3536
namespace mysql_harness {
3637

38+
MY_COMPILER_DIAGNOSTIC_PUSH()
39+
MY_COMPILER_MSVC_DIAGNOSTIC_IGNORE(4275)
3740
class HARNESS_EXPORT invalid_master_keyfile : public std::runtime_error {
3841
public:
3942
invalid_master_keyfile(const std::string &w) : std::runtime_error(w) {}
4043
};
44+
MY_COMPILER_DIAGNOSTIC_POP()
4145

4246
class HARNESS_EXPORT MasterKeyFile {
4347
public:

router/src/http/src/tls_error.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2018, 2020 Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -28,11 +28,14 @@
2828
#include <stdexcept>
2929
#include <string>
3030

31+
#include "my_compiler.h"
3132
#include "mysqlrouter/http_common_export.h"
32-
33+
MY_COMPILER_DIAGNOSTIC_PUSH()
34+
MY_COMPILER_MSVC_DIAGNOSTIC_IGNORE(4275)
3335
class HTTP_COMMON_EXPORT TlsError : public std::runtime_error {
3436
public:
3537
TlsError(const std::string &what);
3638
};
39+
MY_COMPILER_DIAGNOSTIC_POP()
3740

3841
#endif

router/src/mysql_protocol/include/mysqlrouter/mysql_protocol.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <typeinfo>
3434
#include <vector>
3535

36+
#include "my_compiler.h"
3637
#include "mysql_protocol/base_packet.h"
3738
#include "mysql_protocol/constants.h"
3839
#include "mysql_protocol/error_packet.h"
@@ -45,11 +46,14 @@ namespace mysql_protocol {
4546
* @brief Exception raised for any errors with MySQL packets
4647
*
4748
*/
49+
MY_COMPILER_DIAGNOSTIC_PUSH()
50+
MY_COMPILER_MSVC_DIAGNOSTIC_IGNORE(4275)
4851
class MYSQL_PROTOCOL_EXPORT packet_error : public std::runtime_error {
4952
public:
5053
explicit packet_error(const std::string &what_arg)
5154
: std::runtime_error(what_arg) {}
5255
};
56+
MY_COMPILER_DIAGNOSTIC_POP()
5357

5458
} // namespace mysql_protocol
5559

0 commit comments

Comments
 (0)