From 893a2d9c62e8dcc4fe0f43c47e01743136f55386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Sun, 15 Sep 2019 11:25:18 +0200 Subject: MSVC: Warn about unused formal parameters Provide _U_ macro definition for Visual Studio. Change the way _U_ macro is ifdefed for some targets to allow Visual Studio to recognize it. Ping-Bug: 15832 Change-Id: Ic7ce145cbe9e8aa751d64c9c09ce8ba6c1bbbd30 Reviewed-on: https://code.wireshark.org/review/34530 Tested-by: Petri Dish Buildbot Petri-Dish: Peter Wu Reviewed-by: Peter Wu --- ws_attributes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ws_attributes.h') diff --git a/ws_attributes.h b/ws_attributes.h index 7e2245b9c3..d7c4445323 100644 --- a/ws_attributes.h +++ b/ws_attributes.h @@ -27,6 +27,8 @@ extern "C" { #if defined(__GNUC__) /* This includes clang */ #define _U_ __attribute__((unused)) +#elif defined(_MSC_VER) + #define _U_ __pragma(warning(suppress:4100)) #else #define _U_ #endif -- cgit v1.2.3