Browse Source

HTML5: Fix a couple warnings

Add a missing call to disable warnings on a forked env for freetype's
`sfnt.c`.

(cherry picked from commit c44ebb020d633e0e375a2d6d6ca6c1ba09e79111)
Rémi Verschelde 4 years ago
parent
commit
0142a378c6
2 changed files with 2 additions and 1 deletions
  1. 1 0
      modules/freetype/SCsub
  2. 1 1
      modules/websocket/emws_peer.cpp

+ 1 - 0
modules/freetype/SCsub

@@ -82,6 +82,7 @@ if env["builtin_freetype"]:
         # Forcibly undefine this macro so SIMD is not used in this file,
         # Forcibly undefine this macro so SIMD is not used in this file,
         # since currently unsupported in WASM
         # since currently unsupported in WASM
         tmp_env = env_freetype.Clone()
         tmp_env = env_freetype.Clone()
+        tmp_env.disable_warnings()
         tmp_env.Append(CPPFLAGS=["-U__OPTIMIZE__"])
         tmp_env.Append(CPPFLAGS=["-U__OPTIMIZE__"])
         sfnt = tmp_env.Object(sfnt)
         sfnt = tmp_env.Object(sfnt)
     thirdparty_sources += [sfnt]
     thirdparty_sources += [sfnt]

+ 1 - 1
modules/websocket/emws_peer.cpp

@@ -54,7 +54,7 @@ Error EMWSPeer::read_msg(const uint8_t *p_data, uint32_t p_size, bool p_is_strin
 }
 }
 
 
 Error EMWSPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
 Error EMWSPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
-	ERR_FAIL_COND_V(_out_buf_size && (godot_js_websocket_buffered_amount(peer_sock) >= (1ULL << _out_buf_size)), ERR_OUT_OF_MEMORY);
+	ERR_FAIL_COND_V(_out_buf_size && ((uint64_t)godot_js_websocket_buffered_amount(peer_sock) >= (1ULL << _out_buf_size)), ERR_OUT_OF_MEMORY);
 
 
 	int is_bin = write_mode == WebSocketPeer::WRITE_MODE_BINARY ? 1 : 0;
 	int is_bin = write_mode == WebSocketPeer::WRITE_MODE_BINARY ? 1 : 0;