From: Samuel Just Date: Thu, 24 Jul 2025 21:44:39 +0000 (-0700) Subject: test/mds/TestQuiesceDb.cc: fix sequence point error for rocky 10 X-Git-Tag: testing/wip-vshankar-testing-20250829.190601-debug~22^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae133173fda212140590feefabcac2fe33478466;p=ceph-ci.git 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 --- diff --git a/src/test/mds/TestQuiesceDb.cc b/src/test/mds/TestQuiesceDb.cc index 985325a4e9f..7f416e2aaa8 100644 --- a/src/test/mds/TestQuiesceDb.cc +++ b/src/test/mds/TestQuiesceDb.cc @@ -509,8 +509,14 @@ void cartesian_apply(F func, std::array const & ... array_args) { // we use parameter pack expansion as part of the brace initializer // to perform sequential calculation of the + + auto f = [&q](const auto &args) { + q = div(q.quot, args.size()); + return args.at(q.rem); + }; + auto apply_tuple = std::tuple { - (q = div(q.quot, array_args.size()), array_args.at(q.rem)) + f(array_args) ... };