From fcfef3038f36563d96d059398b54c7a6079b21ca Mon Sep 17 00:00:00 2001 From: Matt Millett Date: Wed, 4 Dec 2024 07:26:09 -0500 Subject: [PATCH] Use global allocator in ntcs::Async tests that utilize global state --- groups/ntc/ntccfg/ntccfg_format.cpp | 4 ++-- groups/ntc/ntcs/ntcs_async.t.cpp | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/groups/ntc/ntccfg/ntccfg_format.cpp b/groups/ntc/ntccfg/ntccfg_format.cpp index 4090b41c0..16c921c56 100644 --- a/groups/ntc/ntccfg/ntccfg_format.cpp +++ b/groups/ntc/ntccfg/ntccfg_format.cpp @@ -1598,7 +1598,7 @@ bool FormatUtil::printFloat(FormatOutput output, length = rc; } #else - int rc = sprintf(buffer, format, args); + int rc = sprintf(buffer, format, value); length = rc; #endif @@ -1796,7 +1796,7 @@ bool FormatUtil::printDouble(FormatOutput output, length = rc; } #else - int rc = sprintf(buffer, format, args); + int rc = sprintf(buffer, format, value); length = rc; #endif diff --git a/groups/ntc/ntcs/ntcs_async.t.cpp b/groups/ntc/ntcs/ntcs_async.t.cpp index 76a20885d..afcd01216 100644 --- a/groups/ntc/ntcs/ntcs_async.t.cpp +++ b/groups/ntc/ntcs/ntcs_async.t.cpp @@ -83,8 +83,7 @@ NTSCFG_TEST_FUNCTION(ntcs::AsyncTest::verifyStrand) { bslmt::Semaphore semaphore; - bsl::shared_ptr strand = - ntcs::Async::createStrand(NTSCFG_TEST_ALLOCATOR); + bsl::shared_ptr strand = ntcs::Async::createStrand(); strand->execute(NTCCFG_BIND(&AsyncTest::processFunction, &semaphore)); @@ -105,13 +104,10 @@ NTSCFG_TEST_FUNCTION(ntcs::AsyncTest::verifyTimer) ntci::TimerCallback timerCallback(NTCCFG_BIND(&AsyncTest::processTimer, &semaphore, NTCCFG_BIND_PLACEHOLDER_1, - NTCCFG_BIND_PLACEHOLDER_2), - NTSCFG_TEST_ALLOCATOR); + NTCCFG_BIND_PLACEHOLDER_2)); bsl::shared_ptr timer = - ntcs::Async::createTimer(timerOptions, - timerCallback, - NTSCFG_TEST_ALLOCATOR); + ntcs::Async::createTimer(timerOptions, timerCallback); timer->schedule(timer->currentTime() + bsls::TimeInterval(1));