From 760317dcc70fb41c945963b67e1efbb1ea6ed8f5 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Sat, 14 Sep 2024 00:05:50 +0200 Subject: [PATCH] fixing compilation issues with GCC --- src/renderer/core/memory.cpp | 4 +++- src/renderer/images/texture.cpp | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/renderer/core/memory.cpp b/src/renderer/core/memory.cpp index e3cbe7c..cd70658 100644 --- a/src/renderer/core/memory.cpp +++ b/src/renderer/core/memory.cpp @@ -6,7 +6,7 @@ /* By: kbz_8 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/10/20 22:02:37 by kbz_8 #+# #+# */ -/* Updated: 2024/03/14 16:34:53 by maldavid ### ########.fr */ +/* Updated: 2024/09/14 00:04:16 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,6 +31,8 @@ #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-variable" + #pragma GCC diagnostic ignored "-Wunused-function" + #pragma GCC diagnostic ignored "-Wparentheses" #pragma GCC diagnostic ignored "-Wparentheses" #include #pragma GCC diagnostic pop diff --git a/src/renderer/images/texture.cpp b/src/renderer/images/texture.cpp index 9a48307..2ccb2ae 100644 --- a/src/renderer/images/texture.cpp +++ b/src/renderer/images/texture.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/31 18:03:35 by maldavid #+# #+# */ -/* Updated: 2024/03/14 19:07:01 by maldavid ### ########.fr */ +/* Updated: 2024/09/14 00:04:29 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,7 +18,14 @@ #include #define STB_IMAGE_IMPLEMENTATION -#include +#ifdef MLX_COMPILER_GCC + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstringop-overflow" + #include + #pragma GCC diagnostic pop +#else + #include +#endif #ifdef IMAGE_OPTIMIZED #define TILING VK_IMAGE_TILING_OPTIMAL