This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 596e25f  Fix unknown pragma warnings on mingw Client: cpp Patch: Kevin 
Wojniak
596e25f is described below

commit 596e25f9b07f4eb626e8644b6cc18b93c417b4e5
Author: Kevin Wojniak <[email protected]>
AuthorDate: Sun Nov 3 15:09:51 2019 -0800

    Fix unknown pragma warnings on mingw
    Client: cpp
    Patch: Kevin Wojniak
    
    This closes #1917
    
    These pragmas are only valid for MSVC. Fixes warnings found in the logs:
    
    > In file included from 
C:\projects\thrift\lib\cpp\test\processor\ProcessorTest.cpp:40:
    731C:\projects\thrift\lib\cpp\test\processor\Handlers.h:143: warning: 
ignoring #pragma warning  [-Wunknown-pragmas]
    732  143 |   #pragma warning( push )
    733      |
    734C:\projects\thrift\lib\cpp\test\processor\Handlers.h:144: warning: 
ignoring #pragma warning  [-Wunknown-pragmas]
    735  144 |   #pragma warning (disable : 4250 ) //inheriting methods via 
dominance
    736      |
    737C:\projects\thrift\lib\cpp\test\processor\Handlers.h:172: warning: 
ignoring #pragma warning  [-Wunknown-pragmas]
    738  172 |   #pragma warning( pop )
    739      |
---
 lib/cpp/test/processor/Handlers.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cpp/test/processor/Handlers.h 
b/lib/cpp/test/processor/Handlers.h
index 05d19ed..d72a23c 100644
--- a/lib/cpp/test/processor/Handlers.h
+++ b/lib/cpp/test/processor/Handlers.h
@@ -139,7 +139,7 @@ protected:
   std::shared_ptr<EventLog> log_;
 };
 
-#ifdef _WIN32
+#ifdef _MSC_VER
   #pragma warning( push )
   #pragma warning (disable : 4250 ) //inheriting methods via dominance
 #endif
@@ -168,7 +168,7 @@ protected:
   int32_t value_;
 };
 
-#ifdef _WIN32
+#ifdef _MSC_VER
   #pragma warning( pop )
 #endif
 

Reply via email to