Skip to content

Commit b0127f4

Browse files
authored
Merge pull request #421 from boostorg/unused_var
Fix unused variable warning
2 parents fd5e60f + 86b5f97 commit b0127f4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/ci.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
GIT_FETCH_JOBS: 8
2828
NET_RETRY_COUNT: 5
2929
DEFAULT_BUILD_VARIANT: release
30+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
3031

3132
jobs:
3233
posix:
@@ -252,10 +253,13 @@ jobs:
252253

253254
- toolset: clang
254255
cxxstd: "11,14"
255-
os: macos-11
256+
os: macos-12
256257
- toolset: clang
257258
cxxstd: "20"
258-
os: macos-12
259+
os: macos-13
260+
- toolset: clang
261+
cxxstd: "20"
262+
os: macos-14
259263

260264
runs-on: ${{matrix.os}}
261265
container: ${{matrix.container}}

include/boost/test/utils/named_params.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ struct nil {
131131
#else
132132
operator T const&() const
133133
#endif
134-
{ nfp_detail::report_access_to_invalid_parameter(true); static T* v = 0; BOOST_TEST_UNREACHABLE_RETURN(*v); }
134+
{ nfp_detail::report_access_to_invalid_parameter(true); BOOST_TEST_UNREACHABLE_RETURN(*static_cast<T*>(0)); }
135135

136136
template<typename T>
137137
T any_cast() const
138-
{ nfp_detail::report_access_to_invalid_parameter(true); static typename remove_reference<T>::type* v = 0; BOOST_TEST_UNREACHABLE_RETURN(*v); }
138+
{ nfp_detail::report_access_to_invalid_parameter(true); BOOST_TEST_UNREACHABLE_RETURN(*static_cast<typename std::remove_reference<T>::type*>(0)); }
139139

140140
template<typename Arg1>
141141
nil operator()( Arg1 const& )

0 commit comments

Comments
 (0)