diff options
| author | ashn <[email protected]> | 2023-08-09 13:17:12 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-09 19:17:12 +0200 |
| commit | 90f17499658275ace1e4d1bed1aa231e34ac38b6 (patch) | |
| tree | 4e4719e2153911720fe4adafc44f3c69f84744e3 /src | |
| parent | 42cfabc67069fd01ee8c0b00d58862e32f0942fb (diff) | |
| download | raylib-90f17499658275ace1e4d1bed1aa231e34ac38b6.tar.gz raylib-90f17499658275ace1e4d1bed1aa231e34ac38b6.zip | |
Ignore unused function warnings from external headers when compiling with GCC and Clang (#3235)
Diffstat (limited to 'src')
| -rw-r--r-- | src/rtext.c | 9 | ||||
| -rw-r--r-- | src/rtextures.c | 18 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/rtext.c b/src/rtext.c index a7d9903a..d6aa6d73 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -71,12 +71,21 @@ #include <ctype.h> // Required for: toupper(), tolower() [Used in TextToUpper(), TextToLower()] #if defined(SUPPORT_FILEFORMAT_TTF) + #if defined(__GNUC__) // GCC and Clang + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-function" + #endif + #define STB_RECT_PACK_IMPLEMENTATION #include "external/stb_rect_pack.h" // Required for: ttf font rectangles packaging #define STBTT_STATIC #define STB_TRUETYPE_IMPLEMENTATION #include "external/stb_truetype.h" // Required for: ttf font data reading + + #if defined(__GNUC__) // GCC and Clang + #pragma GCC diagnostic pop + #endif #endif //---------------------------------------------------------------------------------- diff --git a/src/rtextures.c b/src/rtextures.c index 8a391477..f6e7e49c 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -138,6 +138,11 @@ defined(SUPPORT_FILEFORMAT_PIC) || \ defined(SUPPORT_FILEFORMAT_PNM)) + #if defined(__GNUC__) // GCC and Clang + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-function" + #endif + #define STBI_MALLOC RL_MALLOC #define STBI_FREE RL_FREE #define STBI_REALLOC RL_REALLOC @@ -145,6 +150,10 @@ #define STB_IMAGE_IMPLEMENTATION #include "external/stb_image.h" // Required for: stbi_load_from_file() // NOTE: Used to read image data (multiple formats support) + + #if defined(__GNUC__) // GCC and Clang + #pragma GCC diagnostic pop + #endif #endif #if (defined(SUPPORT_FILEFORMAT_DDS) || \ @@ -153,9 +162,18 @@ defined(SUPPORT_FILEFORMAT_PVR) || \ defined(SUPPORT_FILEFORMAT_ASTC)) + #if defined(__GNUC__) // GCC and Clang + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-function" + #endif + #define RL_GPUTEX_IMPLEMENTATION #include "external/rl_gputex.h" // Required for: rl_load_xxx_from_memory() // NOTE: Used to read compressed textures data (multiple formats support) + + #if defined(__GNUC__) // GCC and Clang + #pragma GCC diagnostic pop + #endif #endif #if defined(SUPPORT_FILEFORMAT_QOI) |
