Skip to content

Commit 7f48837

Browse files
committed
CentOS7: silence_unused_warnings
1 parent e4cee5d commit 7f48837

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_constants_and_functions.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ TEST_SUBMODULE(constants_and_functions, m) {
141141
// This should always be enough to trigger the alternative branch
142142
// where `sizeof(capture) > sizeof(rec->data)`
143143
uint64_t capture[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
144+
#if defined(__GNUC__) && __GNUC__ == 4 // CentOS7
145+
py::detail::silence_unused_warnings(capture);
146+
#endif
144147
m.def(
145148
"should_raise", [capture](int) { return capture[9] + 33; }, py::kw_only(), py::arg());
146149
});

0 commit comments

Comments
 (0)