quieting clang-tidy, non-functional changes

Changes to syntax which should not effect generated code
This commit is contained in:
Michael Davidsaver
2023-06-13 13:23:36 -07:00
parent d97943b697
commit 1595ed8860
18 changed files with 17 additions and 46 deletions
-1
View File
@@ -359,7 +359,6 @@ void epicsStdCall asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt)
if(!asActive) return;
if(!pasgmember) return;
pasgmember->userPvt = userPvt;
return;
}
long epicsStdCall asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt,
@@ -25,8 +25,8 @@
namespace {
static epicsThreadOnceId epicsSigletonOnceFlag ( EPICS_THREAD_ONCE_INIT );
static epicsMutex * pEPICSSigletonMutex = 0;
epicsThreadOnceId epicsSigletonOnceFlag ( EPICS_THREAD_ONCE_INIT );
epicsMutex * pEPICSSigletonMutex = 0;
extern "C" void SingletonMutexOnce ( void * /* pParm */ )
{
-10
View File
@@ -34,8 +34,6 @@ void ellAdd (ELLLIST *pList, ELLNODE *pNode)
pList->node.previous = pNode;
pList->count++;
return;
}
/****************************************************************************
*
@@ -65,8 +63,6 @@ void ellConcat (ELLLIST *pDstList, ELLLIST *pAddList)
pAddList->count = 0;
pAddList->node.next = NULL;
pAddList->node.previous = NULL;
return;
}
/****************************************************************************
*
@@ -86,8 +82,6 @@ void ellDelete (ELLLIST *pList, ELLNODE *pNode)
pNode->previous->next = pNode->next;
pList->count--;
return;
}
/****************************************************************************
*
@@ -136,8 +130,6 @@ void ellExtract (ELLLIST *pSrcList, ELLNODE *pStartNode, ELLNODE *pEndNode, ELLL
}
pSrcList->count -= count;
pDstList->count += count;
return;
}
/****************************************************************************
*
@@ -194,8 +186,6 @@ void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode)
pNode->next->previous = pNode;
plist->count++;
return;
}
/****************************************************************************
*
-1
View File
@@ -260,7 +260,6 @@ void errSymTestPrint(long errNum)
if ( message[0] == '\0' ) return;
printf("module %hu number %hu message=\"%s\"\n",
modnum, errnum, message);
return;
}
/****************************************************************
-1
View File
@@ -206,7 +206,6 @@ LIBCOM_API void fdManager::process (double delay)
this->pTimerQueue->process(epicsTime::getCurrent());
}
this->processInProg = false;
return;
}
//
+2 -2
View File
@@ -39,8 +39,8 @@ public:
//
class noFunctionSpecified {};
LIBCOM_API fdRegForOldFdmgr (const SOCKET fdIn, const fdRegType type,
const bool onceOnly, fdManager &manager, pCallBackFDMgr pFunc, void *pParam);
LIBCOM_API fdRegForOldFdmgr (SOCKET fdIn, fdRegType type,
bool onceOnly, fdManager &manager, pCallBackFDMgr pFunc, void *pParam);
LIBCOM_API ~fdRegForOldFdmgr ();
private:
@@ -83,7 +83,6 @@ LIBCOM_API void epicsStdCall
pfl->lock = epicsMutexMustCreate();
*ppvt = (void *)pfl;
VALGRIND_CREATE_MEMPOOL(pfl, REDZONE, 0);
return;
}
LIBCOM_API void * epicsStdCall freeListCalloc(void *pvt)
-2
View File
@@ -56,7 +56,6 @@ void epicsStdCall gphInitPvt(gphPvt **ppvt, int size)
pgphPvt->paplist = callocMustSucceed(size, sizeof(ELLLIST *), "gphInitPvt");
pgphPvt->lock = epicsMutexMustCreate();
*ppvt = pgphPvt;
return;
}
GPHENTRY * epicsStdCall gphFindParse(gphPvt *pgphPvt, const char *name, size_t len, void *pvtid)
@@ -171,7 +170,6 @@ void epicsStdCall gphDelete(gphPvt *pgphPvt, const char *name, void *pvtid)
}
epicsMutexUnlock(pgphPvt->lock);
return;
}
void epicsStdCall gphFreeMem(gphPvt *pgphPvt)
-2
View File
@@ -711,8 +711,6 @@ static void freeLogClient(struct iocLogClient *pclient)
epicsSocketDestroy ( pclient->insock );
free (pclient);
return;
}
+1 -1
View File
@@ -559,7 +559,7 @@ void epicsStdCall iocLogPrefix(const char * prefix)
if (logClientPrefix) {
/* No error message if the new prefix is identical to the old one */
if (strcmp(logClientPrefix, prefix))
if (strcmp(logClientPrefix, prefix)!=0)
printf (ERL_WARNING " iocLogPrefix: The prefix was already set to "
"\"%s\" and can't be changed.\n", logClientPrefix);
return;
+2 -5
View File
@@ -72,7 +72,7 @@ static void trans ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
const char **rawval, char **value, char *valend );
static void cpy2val( const char *src, char **value, char *valend );
static void cpy2val( const char *src, char **value, const char *valend );
static char *Strdup( const char *string );
@@ -763,8 +763,6 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
still there to be seen) */
*rawval = ( *r == '\0' ) ? r - 1 : r;
*value = v;
return;
}
/*
@@ -925,14 +923,13 @@ cleanup:
*rawval = r;
*value = v;
return;
}
/*
* Copy a string, honoring the 'end of destination string' pointer
* Returns with **value pointing to the '\0' terminator
*/
static void cpy2val(const char *src, char **value, char *valend)
static void cpy2val(const char *src, char **value, const char *valend)
{
char *v = *value;
while ((v < valend) && (*v = *src++)) { v++; }
+1 -4
View File
@@ -15,13 +15,10 @@
#include <stdio.h>
#include <string.h>
#include "dbDefs.h"
#include "epicsTypes.h"
#include "osiSock.h"
#ifndef NELEMENTS
#define NELEMENTS(A) (sizeof(A)/sizeof(A[0]))
#endif /*NELEMENTS*/
/*
* addrArrayToUL ()
*/
+1 -1
View File
@@ -503,7 +503,7 @@ long devUnregisterAddress(
return S_dev_addressNotFound;
}
if (strcmp(pOwnerName,pRange->pOwnerName)) {
if (strcmp(pOwnerName,pRange->pOwnerName)!=0) {
s = S_dev_addressOverlap;
errPrintf (
s,
+2 -8
View File
@@ -275,18 +275,12 @@ void epicsThread::setPriority (unsigned int priority) throw ()
bool epicsThread::priorityIsEqual (const epicsThread &otherThread) const throw ()
{
if ( epicsThreadIsEqual (this->id, otherThread.id) ) {
return true;
}
return false;
return epicsThreadIsEqual (this->id, otherThread.id)!=0;
}
bool epicsThread::isSuspended () const throw ()
{
if ( epicsThreadIsSuspended (this->id) ) {
return true;
}
return false;
return epicsThreadIsSuspended (this->id)!=0;
}
bool epicsThread::operator == (const epicsThread &rhs) const throw ()
+3 -2
View File
@@ -44,8 +44,9 @@ void epicsTime::throwError(int code)
}
epicsTime::epicsTime ( const epicsTimeStamp & replace ) {
ts = replace;
epicsTime::epicsTime ( const epicsTimeStamp & replace )
:ts(replace)
{
if(ts.nsec >= nSecPerSec)
throw std::logic_error("epicsTimeStamp has overflow in nano-seconds field");
}
@@ -58,7 +58,7 @@ static void thread_hook(epicsThreadId pthreadInfo)
/* Set the name of the thread's process. Limited to 16 characters. */
char comm[16];
if (strcmp(pthreadInfo->name, "_main_")) {
if (strcmp(pthreadInfo->name, "_main_") != 0) {
snprintf(comm, sizeof(comm), "%s", pthreadInfo->name);
prctl(PR_SET_NAME, comm, 0l, 0l, 0l);
}
+1 -1
View File
@@ -25,7 +25,7 @@
#define nDigitsDottedIP 4u
#define chunkSize 8u
#define makeMask(NBITS) ( ( 1u << ( (unsigned) NBITS) ) - 1u )
#define makeMask(NBITS) ( ( 1u << ( (unsigned) (NBITS)) ) - 1u )
/*
* sockAddrAreIdentical()
+1 -1
View File
@@ -210,7 +210,7 @@ extern "C" epicsTimerQueueId epicsStdCall
epicsSingleton < timerQueueActiveMgr > :: reference ref =
timerQueueMgrEPICS.getReference ();
epicsTimerQueueActiveForC & tmr =
ref->allocate ( ref, okToShare ? true : false, threadPriority );
ref->allocate ( ref, okToShare != 0, threadPriority );
return &tmr;
}
catch ( ... ) {