mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
clang-tidy: enable modernize-use-bool-literals
This commit is contained in:
parent
809d23ac34
commit
f07024ded7
@ -1,2 +1,2 @@
|
||||
Checks: "modernize-redundant-void-arg,modernize-deprecated-headers,-clang-analyzer-security.insecureAPI.rand"
|
||||
Checks: "modernize-use-bool-literals,modernize-redundant-void-arg,modernize-deprecated-headers,-clang-analyzer-security.insecureAPI.rand"
|
||||
WarningsAsErrors: '*'
|
||||
|
||||
@ -69,7 +69,7 @@ namespace Drv {
|
||||
|
||||
// delay waiting for cycles to complete
|
||||
NATIVE_INT_TYPE maxCycles = 10;
|
||||
while (1) {
|
||||
while (true) {
|
||||
Os::Task::delay(500);
|
||||
bool state;
|
||||
//this->invoke_to_gpioRead(0,state);
|
||||
|
||||
@ -326,7 +326,7 @@ namespace Drv {
|
||||
|
||||
Fw::Buffer buff;
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
// wait for data
|
||||
int sizeRead = 0;
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ void qtest_performance() {
|
||||
printf("Testing deep queue...\n");
|
||||
// Fill the queue up first:
|
||||
U32 count = 0;
|
||||
while(1) {
|
||||
while(true) {
|
||||
stat = testQueue->send(sendBuff, count%4, Os::Queue::QUEUE_NONBLOCKING);
|
||||
count++;
|
||||
if(stat == Os::Queue::QUEUE_FULL)
|
||||
@ -488,7 +488,7 @@ void qtest_performance() {
|
||||
elapsedTime = static_cast<F64>(etime.tv_sec - stime.tv_sec) + static_cast<F64>(etime.tv_usec - stime.tv_usec)/1000000;
|
||||
printf("Time: %0.3fs (%0.3fus per)\n", elapsedTime, 1000000*elapsedTime/static_cast<F64>(numIterations));
|
||||
#endif
|
||||
while(1) {
|
||||
while(true) {
|
||||
stat = testQueue->receive(recvBuff, prio, Os::Queue::QUEUE_NONBLOCKING);
|
||||
if(stat == Os::Queue::QUEUE_NO_MORE_MSGS)
|
||||
break;
|
||||
@ -550,7 +550,7 @@ void qtest_concurrent() {
|
||||
printf("Testing deep queue...\n");
|
||||
// Fill the queue up first:
|
||||
U32 count = 0;
|
||||
while(1) {
|
||||
while(true) {
|
||||
stat = testQueue->send(sendBuff,count%4, Os::Queue::QUEUE_NONBLOCKING);
|
||||
count++;
|
||||
if(stat == Os::Queue::QUEUE_FULL)
|
||||
|
||||
@ -247,7 +247,7 @@ namespace Svc {
|
||||
|
||||
for (NATIVE_UINT_TYPE b=0; b<BIN1_NUM_BUFFERS; b++) {
|
||||
NATIVE_UINT_TYPE entry;
|
||||
while (1) {
|
||||
while (true) {
|
||||
entry = rand() % BIN1_NUM_BUFFERS;
|
||||
if (not returned[entry]) {
|
||||
returned[entry] = true;
|
||||
|
||||
@ -20,7 +20,7 @@ namespace Svc {
|
||||
FwEventIdType Id) {
|
||||
// for **nix, delay then exit with error code
|
||||
Os::Log::logMsg("FATAL %d handled.\n",Id,0,0,0,0,0);
|
||||
while (1) {} // Returning might be bad
|
||||
while (true) {} // Returning might be bad
|
||||
}
|
||||
|
||||
} // end namespace Svc
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
// \title LinuxTimerImpl.cpp
|
||||
// \author tim
|
||||
// \brief cpp file for LinuxTimer component implementation class
|
||||
@ -7,8 +7,8 @@
|
||||
// Copyright 2009-2015, by the California Institute of Technology.
|
||||
// ALL RIGHTS RESERVED. United States Government Sponsorship
|
||||
// acknowledged.
|
||||
//
|
||||
// ======================================================================
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
|
||||
#include <Svc/LinuxTimer/LinuxTimerComponentImpl.hpp>
|
||||
@ -18,7 +18,7 @@
|
||||
namespace Svc {
|
||||
|
||||
void LinuxTimerComponentImpl::startTimer(NATIVE_INT_TYPE interval) {
|
||||
while (1) {
|
||||
while (true) {
|
||||
Os::Task::delay(interval);
|
||||
if (this->m_quit) {
|
||||
return;
|
||||
|
||||
@ -34,7 +34,7 @@ namespace Svc {
|
||||
|
||||
timerfd_settime (fd, 0, &itval, NULL);
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
unsigned long long missed;
|
||||
int ret = read (fd, &missed, sizeof (missed));
|
||||
if (-1 == ret) {
|
||||
|
||||
@ -128,7 +128,7 @@ namespace Svc {
|
||||
|
||||
void UdpReceiverComponentImpl::workerTask(void* ptr) {
|
||||
UdpReceiverComponentImpl *compPtr = static_cast<UdpReceiverComponentImpl*>(ptr);
|
||||
while (1) {
|
||||
while (true) {
|
||||
compPtr->doRecv();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user