net: mdns_responder: Replace pragma with TOOLCHAIN_DISABLE macro

These macros were recently introduced and replaced everywhere (#84065),
but this was missed.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
This commit is contained in:
Tom Hughes 2025-03-21 10:43:56 -07:00 committed by Benjamin Cabé
parent 8b65862a83
commit 918ae79522
2 changed files with 4 additions and 7 deletions

View File

@ -693,7 +693,8 @@ do { \
/* GCC-specific warnings that aren't in clang. */
#if defined(__GNUC__) && !defined(__clang__)
#define TOOLCHAIN_WARNING_POINTER_ARITH "-Wpointer-arith"
#define TOOLCHAIN_WARNING_POINTER_ARITH "-Wpointer-arith"
#define TOOLCHAIN_WARNING_STRINGOP_OVERREAD "-Wstringop-overread"
#endif
#define _TOOLCHAIN_DISABLE_WARNING(compiler, warning) \

View File

@ -44,12 +44,8 @@ LOG_MODULE_REGISTER(net_mdns_responder, CONFIG_MDNS_RESPONDER_LOG_LEVEL);
* address-family-specific variants being of differing sizes. Let's not
* mess with code (which looks correct), just silence the compiler.
*/
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-warning-option"
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif
TOOLCHAIN_DISABLE_GCC_WARNING(TOOLCHAIN_WARNING_ARRAY_BOUNDS);
TOOLCHAIN_DISABLE_GCC_WARNING(TOOLCHAIN_WARNING_STRINGOP_OVERREAD);
extern void dns_dispatcher_svc_handler(struct net_socket_service_event *pev);