mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #112132 from akien-mga/4.3-fix-gcc-warnings
[4.3] CI: Fix build with latest MinGW-GCC 15
This commit is contained in:
commit
b8d8e1eaef
4 changed files with 19 additions and 4 deletions
|
|
@ -2331,6 +2331,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++) {
|
||||
|
|
@ -2345,6 +2349,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;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,14 @@
|
|||
|
||||
#include "geometry_2d.h"
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Walloc-zero"
|
||||
#endif
|
||||
#include "thirdparty/clipper2/include/clipper2/clipper.h"
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#include "thirdparty/misc/polypartition.h"
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "thirdparty/misc/stb_rect_pack.h"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -225,7 +225,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)) {
|
||||
|
|
@ -588,7 +588,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));
|
||||
|
|
|
|||
|
|
@ -158,6 +158,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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue