Skip to content

Commit

Permalink
Suppress annoying warnings on new MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
ned14 committed Nov 21, 2024
1 parent d414da8 commit c9d092c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/status-code/generic_code.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Proposed SG14 status_code
(C) 2018 - 2020 Niall Douglas <http://www.nedproductions.biz/> (5 commits)
(C) 2018 - 2024 Niall Douglas <http://www.nedproductions.biz/> (5 commits)
File Created: Feb 2018
Expand Down Expand Up @@ -29,6 +29,11 @@ Distributed under the Boost Software License, Version 1.0.

#include <cerrno> // for error constants

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(push)
#pragma warning(disable : 6326) // constant comparison
#endif

SYSTEM_ERROR2_NAMESPACE_BEGIN

//! The generic error coding (POSIX)
Expand Down Expand Up @@ -488,4 +493,8 @@ SYSTEM_ERROR2_CONSTEXPR14 inline bool operator!=(const T &a, const status_code<D

SYSTEM_ERROR2_NAMESPACE_END

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(pop)
#endif

#endif
9 changes: 9 additions & 0 deletions include/status-code/nt_code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ Distributed under the Boost Software License, Version 1.0.

#include "win32_code.hpp"

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(push)
#pragma warning(disable : 6326) // constant comparison
#endif

SYSTEM_ERROR2_NAMESPACE_BEGIN

//! \exclude
Expand Down Expand Up @@ -232,4 +237,8 @@ inline constexpr const _nt_code_domain &_nt_code_domain::get()

SYSTEM_ERROR2_NAMESPACE_END

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(pop)
#endif

#endif
9 changes: 9 additions & 0 deletions include/status-code/posix_code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Distributed under the Boost Software License, Version 1.0.

#include <cstring> // for strchr and strerror_r

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(push)
#pragma warning(disable : 6326) // constant comparison
#endif

SYSTEM_ERROR2_NAMESPACE_BEGIN

// Fix for issue #48 Issue compiling on arm-none-eabi (newlib) with GNU extensions off
Expand Down Expand Up @@ -192,4 +197,8 @@ namespace mixins

SYSTEM_ERROR2_NAMESPACE_END

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(pop)
#endif

#endif
9 changes: 9 additions & 0 deletions include/status-code/win32_code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ Distributed under the Boost Software License, Version 1.0.

#include "quick_status_code_from_enum.hpp"

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(push)
#pragma warning(disable : 6326) // constant comparison
#endif

SYSTEM_ERROR2_NAMESPACE_BEGIN

//! \exclude
Expand Down Expand Up @@ -239,4 +244,8 @@ namespace mixins

SYSTEM_ERROR2_NAMESPACE_END

#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(pop)
#endif

#endif

0 comments on commit c9d092c

Please sign in to comment.