Skip to content

Commit ae13317

Browse files
committed
test/mds/TestQuiesceDb.cc: fix sequence point error for rocky 10
src/test/mds/TestQuiesceDb.cc:512:10: error: operation on 'q' may be undefined [-Werror=sequence-point] Signed-off-by: Samuel Just <[email protected]>
1 parent 7b5fe62 commit ae13317

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/mds/TestQuiesceDb.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,14 @@ void cartesian_apply(F func, std::array<V, S> const & ... array_args) {
509509

510510
// we use parameter pack expansion as part of the brace initializer
511511
// to perform sequential calculation of the
512+
513+
auto f = [&q](const auto &args) {
514+
q = div(q.quot, args.size());
515+
return args.at(q.rem);
516+
};
517+
512518
auto apply_tuple = std::tuple<V const &...> {
513-
(q = div(q.quot, array_args.size()), array_args.at(q.rem))
519+
f(array_args)
514520
...
515521
};
516522

0 commit comments

Comments
 (0)