From c44ebb020d633e0e375a2d6d6ca6c1ba09e79111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 6 Aug 2021 10:32:02 +0200 Subject: [PATCH] HTML5: Fix warnings and re-enable `werror=yes` on CI Add a missing call to disable warnings on a forked env for freetype's `sfnt.c`. --- .github/workflows/javascript_builds.yml | 2 +- modules/freetype/SCsub | 1 + modules/websocket/emws_peer.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index ced2c36a91a..7f7ebf680fd 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -4,7 +4,7 @@ on: [push, pull_request] # Global Settings env: GODOT_BASE_BRANCH: master - SCONSFLAGS: platform=javascript verbose=yes warnings=extra debug_symbols=no --jobs=2 + SCONSFLAGS: platform=javascript verbose=yes warnings=extra werror=yes debug_symbols=no --jobs=2 SCONS_CACHE_LIMIT: 4096 EM_VERSION: 2.0.25 EM_CACHE_FOLDER: 'emsdk-cache' diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub index fc2535a6ca0..476cb9cf2ad 100644 --- a/modules/freetype/SCsub +++ b/modules/freetype/SCsub @@ -80,6 +80,7 @@ if env["builtin_freetype"]: # Forcibly undefine this macro so SIMD is not used in this file, # since currently unsupported in WASM tmp_env = env_freetype.Clone() + tmp_env.disable_warnings() tmp_env.Append(CPPFLAGS=["-U__OPTIMIZE__"]) sfnt = tmp_env.Object(sfnt) thirdparty_sources += [sfnt] diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp index 69822f6ff3f..d7263dcf434 100644 --- a/modules/websocket/emws_peer.cpp +++ b/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) { - 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;