From 015ab00e1267bf3bf73499f08ada79825725005c Mon Sep 17 00:00:00 2001 From: bibo38 Date: Tue, 6 Sep 2016 23:00:28 +0200 Subject: Enclosed Clang pragmas with ifdef's (#3373) Fixes a warning in MSVC --- src/Protocol/Protocol110x.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Protocol/Protocol110x.cpp b/src/Protocol/Protocol110x.cpp index a117d8750..bf44eb82f 100644 --- a/src/Protocol/Protocol110x.cpp +++ b/src/Protocol/Protocol110x.cpp @@ -41,8 +41,10 @@ Implements the 1.10.x protocol classes: // IMPORTANT: The enum is used to automate the sequential counting of the // Metadata indexes. Adding a new enum value causes the following values to // increase their index. Therefore the ordering of the enum values is VERY important! -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wduplicate-enum" +#ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wduplicate-enum" +#endif namespace Metadata { @@ -272,8 +274,9 @@ namespace Metadata }; } -#pragma clang diagnostic pop // Restore ignored clang errors - +#ifdef __clang__ + #pragma clang diagnostic pop // Restore ignored clang errors +#endif -- cgit v1.2.3