From e647cfc4107df026109bc7c9564b3f204fb0fd69 Mon Sep 17 00:00:00 2001 From: flagarde Date: Thu, 31 Oct 2024 09:36:38 +0800 Subject: [PATCH] fix warnings --- cpp-terminal/private/cursor.cpp | 3 +++ cpp-terminal/private/exception.cpp | 4 ++++ cpp-terminal/private/file.cpp | 4 ++++ cpp-terminal/private/file_initializer.cpp | 4 ++++ cpp-terminal/private/input.cpp | 4 ++++ cpp-terminal/private/screen.cpp | 4 ++++ cpp-terminal/private/terminal_impl.cpp | 6 +++--- cpp-terminal/private/terminfo.cpp | 4 ++++ cpp-terminal/private/unicode.cpp | 4 ++++ 9 files changed, 34 insertions(+), 3 deletions(-) diff --git a/cpp-terminal/private/cursor.cpp b/cpp-terminal/private/cursor.cpp index 5c7b0642..070d648a 100644 --- a/cpp-terminal/private/cursor.cpp +++ b/cpp-terminal/private/cursor.cpp @@ -12,7 +12,10 @@ #include "file_initializer.hpp" #if defined(_WIN32) + #pragma warning(push) + #pragma warning(disable : 4668) #include + #pragma warning(pop) #else #include #include diff --git a/cpp-terminal/private/exception.cpp b/cpp-terminal/private/exception.cpp index 915ba9ff..8b8d269d 100644 --- a/cpp-terminal/private/exception.cpp +++ b/cpp-terminal/private/exception.cpp @@ -20,7 +20,11 @@ #include "cpp-terminal/private/unicode.hpp" #include + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #if defined(MessageBox) #undef MessageBox #endif diff --git a/cpp-terminal/private/file.cpp b/cpp-terminal/private/file.cpp index b79e0f05..e31ddb5a 100644 --- a/cpp-terminal/private/file.cpp +++ b/cpp-terminal/private/file.cpp @@ -16,7 +16,11 @@ #if defined(_WIN32) #include + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #else #include #include diff --git a/cpp-terminal/private/file_initializer.cpp b/cpp-terminal/private/file_initializer.cpp index 718bab72..0d595db4 100644 --- a/cpp-terminal/private/file_initializer.cpp +++ b/cpp-terminal/private/file_initializer.cpp @@ -16,7 +16,11 @@ #include "cpp-terminal/private/unicode.hpp" #include + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #if defined(MessageBox) #undef MessageBox #endif diff --git a/cpp-terminal/private/input.cpp b/cpp-terminal/private/input.cpp index 97eac770..4a898e68 100644 --- a/cpp-terminal/private/input.cpp +++ b/cpp-terminal/private/input.cpp @@ -10,7 +10,11 @@ #include "cpp-terminal/private/unicode.hpp" #include + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #elif defined(__APPLE__) || defined(__wasm__) || defined(__wasm) || defined(__EMSCRIPTEN__) #include #include diff --git a/cpp-terminal/private/screen.cpp b/cpp-terminal/private/screen.cpp index 29813188..34495069 100644 --- a/cpp-terminal/private/screen.cpp +++ b/cpp-terminal/private/screen.cpp @@ -10,7 +10,11 @@ #include "cpp-terminal/screen.hpp" #ifdef _WIN32 + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #else #include #endif diff --git a/cpp-terminal/private/terminal_impl.cpp b/cpp-terminal/private/terminal_impl.cpp index 6f0039f7..d3a06208 100644 --- a/cpp-terminal/private/terminal_impl.cpp +++ b/cpp-terminal/private/terminal_impl.cpp @@ -15,10 +15,10 @@ #if defined(_WIN32) #include - #pragma warning( push ) - #pragma warning( disable : 4668) + #pragma warning(push) + #pragma warning(disable : 4668) #include - #pragma warning( pop ) + #pragma warning(pop) #if !defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING) #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 #endif diff --git a/cpp-terminal/private/terminfo.cpp b/cpp-terminal/private/terminfo.cpp index d8d6866a..b122f8ea 100644 --- a/cpp-terminal/private/terminfo.cpp +++ b/cpp-terminal/private/terminfo.cpp @@ -8,7 +8,11 @@ */ #ifdef _WIN32 + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #endif #include "cpp-terminal/cursor.hpp" diff --git a/cpp-terminal/private/unicode.cpp b/cpp-terminal/private/unicode.cpp index 8523e816..7638b89e 100644 --- a/cpp-terminal/private/unicode.cpp +++ b/cpp-terminal/private/unicode.cpp @@ -13,7 +13,11 @@ #if defined(_WIN32) #include + #pragma warning(push) + #pragma warning(disable : 4668) + #define WIN32_LEAN_AND_MEAN #include + #pragma warning(pop) #endif #include