Skip to content

Commit 773eaff

Browse files
committed
suppress warn_no_unused gcc bug
1 parent 5552dda commit 773eaff

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/StfSender/StfSenderOutput.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void StfSenderOutput::StfSchedulerThread()
238238

239239
// increase the priority
240240
#if defined(__linux__)
241-
(void) nice(-10);
241+
if (nice(-10)) {}
242242
#endif
243243

244244
std::unique_ptr<SubTimeFrame> lStf;
@@ -408,7 +408,7 @@ void StfSenderOutput::DataHandlerThread(const std::string pTfBuilderId)
408408
DDDLOG("StfSenderOutput[{}]: Starting the thread", pTfBuilderId);
409409
// decrease the priority
410410
#if defined(__linux__)
411-
(void) nice(2);
411+
if (nice(2)) {}
412412
#endif
413413

414414
CoalescedHdrDataSerializer *lStfSerializer = nullptr;
@@ -481,7 +481,7 @@ void StfSenderOutput::StfDropThread()
481481
DDDLOG("Starting DataDropThread thread.");
482482
// decrease the priority
483483
#if defined(__linux__)
484-
(void) nice(5);
484+
if (nice(5)) {}
485485
#endif
486486

487487
std::uint64_t lNumDroppedStfs = 0;
@@ -517,7 +517,7 @@ void StfSenderOutput::StfMonitoringThread()
517517

518518
// decrease the priority
519519
#if defined(__linux__)
520-
(void) nice(10);
520+
if (nice(10)) {}
521521
#endif
522522

523523
StdSenderOutputCounters lPrevCounters;

src/common/base/DataDistLogger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ struct DataDistLoggerCtx {
360360

361361
sRateUpdateThread = std::thread([&]() {
362362
#if defined(__linux__)
363-
(void) nice(+1);
363+
if (nice(+1)) {}
364364
pthread_setname_np(pthread_self(), "log_clock");
365365
#endif
366366
while (sRunning) {
@@ -374,7 +374,7 @@ struct DataDistLoggerCtx {
374374
mInfoLoggerThread = std::thread([&]() {
375375
// nice the collection thread to decrease contention with sending threads
376376
#if defined(__linux__)
377-
(void) nice(+10);
377+
if (nice(+10)) {}
378378
pthread_setname_np(pthread_self(), "infolog");
379379
#endif
380380

src/common/monitoring/DataDistMonitoring.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void DataDistMonitoring::MetricCollectionThread()
7272

7373
// nice the collection thread to decrease contention with sending threads
7474
#if defined(__linux__)
75-
(void) nice(+10);
75+
if (nice(+10)) {}
7676
#endif
7777

7878
while (mRunning) {

0 commit comments

Comments
 (0)