Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde committed Oct 31, 2024
1 parent 012bf99 commit e647cfc
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 3 deletions.
3 changes: 3 additions & 0 deletions cpp-terminal/private/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
#include "file_initializer.hpp"

#if defined(_WIN32)
#pragma warning(push)
#pragma warning(disable : 4668)
#include <windows.h>
#pragma warning(pop)
#else
#include <sys/ioctl.h>
#include <termios.h>
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
#include "cpp-terminal/private/unicode.hpp"

#include <memory>
#pragma warning(push)

Check warning on line 23 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 23 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 23 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#pragma warning(disable : 4668)

Check warning on line 24 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 24 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 24 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)

Check warning on line 27 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 27 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 27 in cpp-terminal/private/exception.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#if defined(MessageBox)
#undef MessageBox
#endif
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

#if defined(_WIN32)
#include <io.h>
#pragma warning(push)
#pragma warning(disable : 4668)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)
#else
#include <sys/ioctl.h>
#include <unistd.h>
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/file_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#include "cpp-terminal/private/unicode.hpp"

#include <io.h>
#pragma warning(push)

Check warning on line 19 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 19 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 19 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#pragma warning(disable : 4668)

Check warning on line 20 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 20 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 20 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)

Check warning on line 23 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 23 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 23 in cpp-terminal/private/file_initializer.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#if defined(MessageBox)
#undef MessageBox
#endif
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
#include "cpp-terminal/private/unicode.hpp"

#include <vector>
#pragma warning(push)
#pragma warning(disable : 4668)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)
#elif defined(__APPLE__) || defined(__wasm__) || defined(__wasm) || defined(__EMSCRIPTEN__)
#include <cerrno>
#include <csignal>
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
#include "cpp-terminal/screen.hpp"

#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable : 4668)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)
#else
#include <sys/ioctl.h>
#endif
Expand Down
6 changes: 3 additions & 3 deletions cpp-terminal/private/terminal_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

#if defined(_WIN32)
#include <io.h>
#pragma warning( push )
#pragma warning( disable : 4668)
#pragma warning(push)

Check warning on line 18 in cpp-terminal/private/terminal_impl.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#pragma warning(disable : 4668)
#include <windows.h>
#pragma warning( pop )
#pragma warning(pop)
#if !defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/terminfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
*/

#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable : 4668)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)
#endif

#include "cpp-terminal/cursor.hpp"
Expand Down
4 changes: 4 additions & 0 deletions cpp-terminal/private/unicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@

#if defined(_WIN32)
#include <limits>
#pragma warning(push)

Check warning on line 16 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 16 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 16 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#pragma warning(disable : 4668)

Check warning on line 17 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 17 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 17 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma warning(pop)

Check warning on line 20 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++14)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 20 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++17)

ignoring '#pragma warning ' [-Wunknown-pragmas]

Check warning on line 20 in cpp-terminal/private/unicode.cpp

View workflow job for this annotation

GitHub Actions / ucrt64 (c++11)

ignoring '#pragma warning ' [-Wunknown-pragmas]
#endif

#include <array>
Expand Down

0 comments on commit e647cfc

Please sign in to comment.