diff options
author | Tomasz Moń <desowin@gmail.com> | 2019-09-15 11:25:18 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-09-21 08:51:34 +0000 |
commit | 893a2d9c62e8dcc4fe0f43c47e01743136f55386 (patch) | |
tree | d42803e115b676b08c0a659df75390554d2b53b9 /ws_attributes.h | |
parent | 29be7f9d9a6452a63cb22c425ac1c56d1f99f10d (diff) |
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 <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ws_attributes.h')
-rw-r--r-- | ws_attributes.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |