summaryrefslogtreecommitdiff
path: root/modules/websocket
diff options
context:
space:
mode:
authorDualtagh Murray <dualtagh.murray@gonitro.com>2018-10-04 14:38:52 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-19 11:45:24 +0200
commitb902a2f2a7438810cdcb053568ed5c27089b1e8a (patch)
tree0a70fb9dd0093ea6f3ad024616c665f9669077ff /modules/websocket
parenta3072aa35e3bfd69d826fa33328b3ce1862f472a (diff)
Fixing warnings generated by MSVC
Fixes #22684.
Diffstat (limited to 'modules/websocket')
-rw-r--r--modules/websocket/lws_client.cpp4
-rw-r--r--modules/websocket/websocket_multiplayer.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/websocket/lws_client.cpp b/modules/websocket/lws_client.cpp
index b3e5f6ffab..add3931b50 100644
--- a/modules/websocket/lws_client.cpp
+++ b/modules/websocket/lws_client.cpp
@@ -34,6 +34,10 @@
#include "core/io/stream_peer_ssl.h"
#include "tls/mbedtls/wrapper/include/openssl/ssl.h"
+#if defined(MINGW_ENABLED) || defined(_MSC_VER)
+#define strncpy strncpy_s
+#endif
+
Error LWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, PoolVector<String> p_protocols) {
ERR_FAIL_COND_V(context != NULL, FAILED);
diff --git a/modules/websocket/websocket_multiplayer.cpp b/modules/websocket/websocket_multiplayer.cpp
index b948c439df..873658559a 100644
--- a/modules/websocket/websocket_multiplayer.cpp
+++ b/modules/websocket/websocket_multiplayer.cpp
@@ -313,7 +313,7 @@ void WebSocketMultiplayerPeer::_process_multiplayer(Ref<WebSocketPeer> p_peer, u
} else if (to < 0) {
// All but one, for us if not excluded
- if (_peer_id != -p_peer_id)
+ if (_peer_id != -(int32_t)p_peer_id)
_store_pkt(from, to, in_buffer, data_size);
} else {