From d5579066b9a7e42fb61fe14429bfd92415c2cc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 28 Oct 2025 21:09:44 +0100 Subject: [PATCH 1/4] CI: Restore `make_rst.py` executable bit --- doc/tools/make_rst.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 doc/tools/make_rst.py diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py old mode 100644 new mode 100755 From 6b017abaa493d9f837d75e49e37ad7ac775f170b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:45:32 +0200 Subject: [PATCH 2/4] [Windows] Rename `PKEY_Device_FriendlyName` to avoid duplicate symbols with newer MinGW SDKs. (cherry picked from commit c363e130519281d9bdaf421d9ba84ad33564d38d) --- drivers/wasapi/audio_driver_wasapi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 8ea1f52d156..0f72d33ea57 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -89,7 +89,7 @@ __CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7 #endif // __MINGW32__ || __MINGW64__ -#ifndef PKEY_Device_FriendlyName +#ifndef PKEY_Device_FriendlyNameGodot #undef DEFINE_PROPERTYKEY /* clang-format off */ @@ -97,7 +97,7 @@ __CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7 const PROPERTYKEY id = { { a, b, c, { d, e, f, g, h, i, j, k, } }, l }; /* clang-format on */ -DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); +DEFINE_PROPERTYKEY(PKEY_Device_FriendlyNameGodot, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); #endif const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator); @@ -237,7 +237,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i PROPVARIANT propvar; PropVariantInit(&propvar); - hr = props->GetValue(PKEY_Device_FriendlyName, &propvar); + hr = props->GetValue(PKEY_Device_FriendlyNameGodot, &propvar); ERR_BREAK(hr != S_OK); if (p_device->device_name == String(propvar.pwszVal)) { @@ -609,7 +609,7 @@ PackedStringArray AudioDriverWASAPI::audio_device_get_list(bool p_input) { PROPVARIANT propvar; PropVariantInit(&propvar); - hr = props->GetValue(PKEY_Device_FriendlyName, &propvar); + hr = props->GetValue(PKEY_Device_FriendlyNameGodot, &propvar); ERR_BREAK(hr != S_OK); list.push_back(String(propvar.pwszVal)); From 36e2050eea620961694f94218e484ed18c7d35f5 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Fri, 17 Oct 2025 15:21:57 -0500 Subject: [PATCH 3/4] Core: Sidestep GCC false-positives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit acdb8667b56a43db6eee9a96ad61147bb80ea785) Adds some more fixes for 4.5. Co-authored-by: Rémi Verschelde --- core/io/image.cpp | 7 +++++++ scene/2d/tile_map.cpp | 3 ++- scene/resources/packed_scene.cpp | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/io/image.cpp b/core/io/image.cpp index c72064e4f71..a70aeb7fdf8 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2350,6 +2350,10 @@ void Image::initialize_data(const char **p_xpm) { } break; case READING_PIXELS: { int y = line - colormap_size - 1; +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wstringop-overflow=0" +#endif for (int x = 0; x < size_width; x++) { char pixelstr[6] = { 0, 0, 0, 0, 0, 0 }; for (int i = 0; i < pixelchars; i++) { @@ -2364,6 +2368,9 @@ void Image::initialize_data(const char **p_xpm) { } _put_pixelb(x, y, pixel_size, data_write, pixel); } +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif if (y == (size_height - 1)) { status = DONE; diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 62785fe1487..da2dbb3f834 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1938,7 +1938,8 @@ void TileMapLayer::set_tile_data(TileMapLayer::DataFormat p_format, const Vector for (int i = 0; i < c; i += offset) { const uint8_t *ptr = (const uint8_t *)&r[i]; uint8_t local[12]; - for (int j = 0; j < ((p_format >= TileMapLayer::FORMAT_2) ? 12 : 8); j++) { + const int buffer_size = (p_format >= TileMapLayer::FORMAT_2) ? 12 : 8; + for (int j = 0; j < buffer_size; j++) { local[j] = ptr[j]; } diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 1f6e453e88e..ece473ca2e5 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -157,6 +157,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { const NodeData *nd = &nodes[0]; Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc); + ret_nodes[0] = nullptr; // Sidesteps "maybe uninitialized" false-positives on GCC. bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty(); From 484cd60f2ec0ee1648edd079be103196794ec19e Mon Sep 17 00:00:00 2001 From: Griffin Kroah-Hartman Date: Sun, 7 Jan 2024 14:20:18 +0100 Subject: [PATCH 4/4] Fix build warning with memset value being too large Should resolve issue #83342 (cherry picked from commits b97cb5ec5908569dd80dcfc38548e9925a05cc5a and 21ae69a1de56afa3b8b7deb5b8cccd2cacd9e096) --- drivers/gles3/storage/texture_storage.cpp | 8 ++++---- .../rendering/renderer_rd/storage_rd/texture_storage.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp index fc434e0d487..1e94adf9954 100644 --- a/drivers/gles3/storage/texture_storage.cpp +++ b/drivers/gles3/storage/texture_storage.cpp @@ -1475,7 +1475,7 @@ void TextureStorage::update_texture_atlas() { //generate atlas Vector itemsv; itemsv.resize(texture_atlas.textures.size()); - int base_size = 8; + uint32_t base_size = 8; int idx = 0; @@ -1488,7 +1488,7 @@ void TextureStorage::update_texture_atlas() { si.size.height = (src_tex->height / border) + 1; si.pixel_size = Size2i(src_tex->width, src_tex->height); - if (base_size < si.size.width) { + if (base_size < (uint32_t)si.size.width) { base_size = nearest_power_of_2_templated(si.size.width); } @@ -1519,7 +1519,7 @@ void TextureStorage::update_texture_atlas() { TextureAtlas::SortItem &si = items[i]; int best_idx = -1; int best_height = 0x7FFFFFFF; - for (int j = 0; j <= base_size - si.size.width; j++) { + for (uint32_t j = 0; j <= base_size - si.size.width; j++) { int height = 0; for (int k = 0; k < si.size.width; k++) { int h = v_offsets[k + j]; @@ -1550,7 +1550,7 @@ void TextureStorage::update_texture_atlas() { } } - if (max_height <= base_size * 2) { + if ((uint32_t)max_height <= base_size * 2) { atlas_height = max_height; break; //good ratio, break; } diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp index 307cbd703aa..23d24a599a8 100644 --- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp @@ -2552,7 +2552,7 @@ void TextureStorage::update_decal_atlas() { //generate atlas Vector itemsv; itemsv.resize(decal_atlas.textures.size()); - int base_size = 8; + uint32_t base_size = 8; int idx = 0; @@ -2565,7 +2565,7 @@ void TextureStorage::update_decal_atlas() { si.size.height = (src_tex->height / border) + 1; si.pixel_size = Size2i(src_tex->width, src_tex->height); - if (base_size < si.size.width) { + if (base_size < (uint32_t)si.size.width) { base_size = nearest_power_of_2_templated(si.size.width); } @@ -2596,7 +2596,7 @@ void TextureStorage::update_decal_atlas() { DecalAtlas::SortItem &si = items[i]; int best_idx = -1; int best_height = 0x7FFFFFFF; - for (int j = 0; j <= base_size - si.size.width; j++) { + for (uint32_t j = 0; j <= base_size - si.size.width; j++) { int height = 0; for (int k = 0; k < si.size.width; k++) { int h = v_offsets[k + j]; @@ -2627,7 +2627,7 @@ void TextureStorage::update_decal_atlas() { } } - if (max_height <= base_size * 2) { + if ((uint32_t)max_height <= base_size * 2) { atlas_height = max_height; break; //good ratio, break; }