From 4f56e0ac8a789e60f6e164ae6fe3933f2d6692b6 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Thu, 30 Mar 2023 08:26:14 +0200 Subject: [PATCH] limine: Fix spurious deprecation warnings coming from limine.h --- limine.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/limine.h b/limine.h index a9afb7e9..f26d8c56 100644 --- a/limine.h +++ b/limine.h @@ -31,6 +31,19 @@ extern "C" { # define LIMINE_PTR(TYPE) TYPE #endif +#ifdef __GNUC__ +# define LIMINE_DEPRECATED __attribute__((__deprecated__)) +# define LIMINE_DEPRECATED_IGNORE_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +# define LIMINE_DEPRECATED_IGNORE_END \ + _Pragma("GCC diagnostic pop") +#else +# define LIMINE_DEPRECATED +# define LIMINE_DEPRECATED_IGNORE_START +# define LIMINE_DEPRECATED_IGNORE_END +#endif + #define LIMINE_COMMON_MAGIC 0xc7b1dd30df4c8b88, 0x0a82e883a194f07b struct limine_uuid { @@ -191,11 +204,7 @@ struct limine_framebuffer_request { #define LIMINE_TERMINAL_OOB_OUTPUT_ONOCR (1 << 6) #define LIMINE_TERMINAL_OOB_OUTPUT_OPOST (1 << 7) -#ifdef __GNUC__ -# define LIMINE_DEPRECATED __attribute__((__deprecated__)) -#else -# define LIMINE_DEPRECATED -#endif +LIMINE_DEPRECATED_IGNORE_START struct LIMINE_DEPRECATED limine_terminal; @@ -222,6 +231,8 @@ struct LIMINE_DEPRECATED limine_terminal_request { LIMINE_PTR(limine_terminal_callback) callback; }; +LIMINE_DEPRECATED_IGNORE_END + /* 5-level paging */ #define LIMINE_5_LEVEL_PAGING_REQUEST { LIMINE_COMMON_MAGIC, 0x94469551da9b3192, 0xebe5e86db7382888 }