Skip to content

Commit

Permalink
Fix warning in Mac rewarding unnecessary lambda capture (#4052)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Nov 27, 2023
1 parent fbee189 commit 8eae255
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/blackbox/common/BlackboxTestsTransportSHM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,19 @@ TEST(SHM, IgnoreNonExistentSegment)
// Create and quickly destroy several participants in several threads
#ifdef _WIN32
constexpr size_t num_threads = 1;
constexpr size_t num_parts = 2;
#else
constexpr size_t num_threads = 10;
constexpr size_t num_parts = 10;
#endif // _WIN32
std::vector<std::thread> threads;
for (size_t i = 0; i < num_threads; i++)
{
threads.push_back(std::thread([num_parts]()
threads.push_back(std::thread([]()
{
#ifdef _WIN32
constexpr size_t num_parts = 2;
#else
constexpr size_t num_parts = 10;
#endif // _WIN32
for (size_t i = 0; i < num_parts; ++i)
{
PubSubWriter<Data1mbPubSubType> late_writer(TEST_TOPIC_NAME);
Expand Down

0 comments on commit 8eae255

Please sign in to comment.