diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-08-25 13:14:22 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-08-25 13:14:22 +0200 |
| commit | e99ed99db83d399ebaecebf178e4e82a13e80be6 (patch) | |
| tree | fff0675f81bfbc8ec71006b9ceb4943098522d75 | |
| parent | fd6cc149c84a8fc0d657ae2385ae62ac2fcac926 (diff) | |
sokol_gfx.h win32: ignore unknown pragma warnings when building with gcc (fixes #1311)
| -rw-r--r-- | sokol_audio.h | 7 | ||||
| -rw-r--r-- | sokol_gfx.h | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/sokol_audio.h b/sokol_audio.h index e4c925fc..a64eabc9 100644 --- a/sokol_audio.h +++ b/sokol_audio.h @@ -695,6 +695,10 @@ inline void saudio_setup(const saudio_desc& desc) { return saudio_setup(&desc); #if defined(SOKOL_DUMMY_BACKEND) #define _SAUDIO_NOTHREADS (1) #elif defined(_SAUDIO_WINDOWS) + #if defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunknown-pragmas" + #endif #define _SAUDIO_WINTHREADS (1) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN @@ -740,6 +744,9 @@ inline void saudio_setup(const saudio_desc& desc) { return saudio_setup(&desc); #pragma warning(push) #pragma warning(disable:4505) /* unreferenced local function has been removed */ #endif + #if defined(__GNUC__) + #pragma GCC diagnostic pop + #endif #elif defined(_SAUDIO_APPLE) #define _SAUDIO_PTHREADS (1) #include <pthread.h> diff --git a/sokol_gfx.h b/sokol_gfx.h index 052f749e..b2793f61 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -5284,6 +5284,10 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_ #endif #if defined(SOKOL_D3D11) + #if defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunknown-pragmas" + #endif #ifndef D3D11_NO_HELPERS #define D3D11_NO_HELPERS #endif @@ -5295,11 +5299,12 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_ #endif #include <d3d11.h> #include <d3dcompiler.h> - #ifdef _MSC_VER #pragma comment (lib, "kernel32") #pragma comment (lib, "user32") #pragma comment (lib, "dxgi") #pragma comment (lib, "d3d11") + #if defined(__GNUC__) + #pragma GCC diagnostic pop #endif #elif defined(SOKOL_METAL) // see https://clang.llvm.org/docs/LanguageExtensions.html#automatic-reference-counting |