Skip to content

Commit

Permalink
Ignore 'warning C4702: unreachable code' in MSVC 2015
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickJadoul committed Nov 18, 2020
1 parent 99ca9aa commit 483d501
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tests/test_iostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
BSD-style license that can be found in the LICENSE file.
*/

#if defined(_MSC_VER) && _MSC_VER < 1910 // VS 2015's MSVC
# pragma warning(disable: 4702) // unreachable code in system header (xatomic.h(382))
#endif

#include <pybind11/iostream.h>
#include "pybind11_tests.h"
Expand Down Expand Up @@ -44,7 +47,7 @@ struct TestThread {
delete t_;
}

void stop() { stop_ = 1; }
void stop() { stop_ = true; }

void join() {
py::gil_scoped_release gil_lock;
Expand Down
4 changes: 2 additions & 2 deletions tests/test_smart_ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
BSD-style license that can be found in the LICENSE file.
*/

#if defined(_MSC_VER) && _MSC_VER < 1910
# pragma warning(disable: 4702) // unreachable code in system header
#if defined(_MSC_VER) && _MSC_VER < 1910 // VS 2015's MSVC
# pragma warning(disable: 4702) // unreachable code in system header (xatomic.h(382))
#endif

#include "pybind11_tests.h"
Expand Down

0 comments on commit 483d501

Please sign in to comment.