Clean up build warnings from clang.
This commit is contained in:
@@ -446,7 +446,7 @@ SV * CA_new(const char *class, const char *name, ...) {
|
||||
SvREADONLY_on(ca_obj);
|
||||
|
||||
pch->chan_ref = ca_ref;
|
||||
SvREFCNT_inc(ca_ref);
|
||||
(void) SvREFCNT_inc(ca_ref);
|
||||
|
||||
if (items > 2
|
||||
&& SvOK(ST(2))) {
|
||||
@@ -943,7 +943,7 @@ SV * CA_create_subscription(SV *ca_ref, const char *mask_str, SV *sub, ...) {
|
||||
|
||||
sv_setiv(mon_obj, (IV)event);
|
||||
SvREADONLY_on(mon_obj);
|
||||
SvREFCNT_inc(mon_ref);
|
||||
(void) SvREFCNT_inc(mon_ref);
|
||||
|
||||
return mon_ref;
|
||||
|
||||
|
||||
@@ -213,6 +213,17 @@ unsigned short epicsShareAPI recGblResetAlarms(void *precord)
|
||||
}
|
||||
return val_mask;
|
||||
}
|
||||
|
||||
int recGblSetSevr(void *precord, epicsEnum16 new_stat, epicsEnum16 new_sevr)
|
||||
{
|
||||
struct dbCommon *prec = precord;
|
||||
if (prec->nsev < new_sevr) {
|
||||
prec->nsta = new_stat;
|
||||
prec->nsev = new_sevr;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void epicsShareAPI recGblFwdLink(void *precord)
|
||||
{
|
||||
|
||||
+25
-30
@@ -1,10 +1,9 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* recGbl.h */
|
||||
@@ -15,6 +14,7 @@
|
||||
#ifndef INCrecGblh
|
||||
#define INCrecGblh 1
|
||||
|
||||
#include "epicsTypes.h"
|
||||
#include "shareLib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -23,13 +23,6 @@ extern "C" {
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#define recGblSetSevr(PREC,NSTA,NSEV) \
|
||||
(\
|
||||
((PREC)->nsev<(NSEV))\
|
||||
? ((PREC)->nsta=(NSTA),(PREC)->nsev=(NSEV),TRUE)\
|
||||
: FALSE\
|
||||
)
|
||||
|
||||
/* Structures needed for args */
|
||||
|
||||
struct link;
|
||||
@@ -42,31 +35,33 @@ struct dbCommon;
|
||||
/* Hook Routine */
|
||||
|
||||
typedef void (*RECGBL_ALARM_HOOK_ROUTINE)(struct dbCommon *prec,
|
||||
unsigned short prev_sevr, unsigned short prev_stat);
|
||||
epicsEnum16 prev_sevr, epicsEnum16 prev_stat);
|
||||
extern RECGBL_ALARM_HOOK_ROUTINE recGblAlarmHook;
|
||||
|
||||
/* Global Record Support Routines */
|
||||
|
||||
epicsShareFunc void epicsShareAPI recGblDbaddrError(
|
||||
long status, const struct dbAddr *paddr, const char *pcaller_name);
|
||||
epicsShareFunc void epicsShareAPI recGblRecordError(
|
||||
long status, void *precord, const char *pcaller_name);
|
||||
epicsShareFunc void epicsShareAPI recGblRecSupError(
|
||||
long status, const struct dbAddr *paddr, const char *pcaller_name, const char *psupport_name);
|
||||
epicsShareFunc void epicsShareAPI recGblGetGraphicDouble(
|
||||
const struct dbAddr *paddr, struct dbr_grDouble *pgd);
|
||||
epicsShareFunc void epicsShareAPI recGblGetControlDouble(
|
||||
epicsShareFunc void recGblDbaddrError(long status, const struct dbAddr *paddr,
|
||||
const char *pcaller_name);
|
||||
epicsShareFunc void recGblRecordError(long status, void *precord,
|
||||
const char *pcaller_name);
|
||||
epicsShareFunc void recGblRecSupError(long status, const struct dbAddr *paddr,
|
||||
const char *pcaller_name, const char *psupport_name);
|
||||
epicsShareFunc void recGblGetGraphicDouble(const struct dbAddr *paddr,
|
||||
struct dbr_grDouble *pgd);
|
||||
epicsShareFunc void recGblGetControlDouble(
|
||||
const struct dbAddr *paddr, struct dbr_ctrlDouble *pcd);
|
||||
epicsShareFunc void epicsShareAPI recGblGetAlarmDouble(
|
||||
const struct dbAddr *paddr, struct dbr_alDouble *pad);
|
||||
epicsShareFunc void epicsShareAPI recGblGetPrec(
|
||||
const struct dbAddr *paddr, long *pprecision);
|
||||
epicsShareFunc int epicsShareAPI recGblInitConstantLink(
|
||||
struct link *plink,short dbftype,void *pdest);
|
||||
epicsShareFunc unsigned short epicsShareAPI recGblResetAlarms(void *precord);
|
||||
epicsShareFunc void epicsShareAPI recGblFwdLink(void *precord);
|
||||
epicsShareFunc void epicsShareAPI recGblGetTimeStamp(void *precord);
|
||||
epicsShareFunc void epicsShareAPI recGblTSELwasModified(struct link *plink);
|
||||
epicsShareFunc void recGblGetAlarmDouble(const struct dbAddr *paddr,
|
||||
struct dbr_alDouble *pad);
|
||||
epicsShareFunc void recGblGetPrec(const struct dbAddr *paddr,
|
||||
long *pprecision);
|
||||
epicsShareFunc int recGblInitConstantLink(struct link *plink,
|
||||
short dbftype, void *pdest);
|
||||
epicsShareFunc unsigned short recGblResetAlarms(void *precord);
|
||||
epicsShareFunc int recGblSetSevr(void *precord, epicsEnum16 new_stat,
|
||||
epicsEnum16 new_sevr);
|
||||
epicsShareFunc void recGblFwdLink(void *precord);
|
||||
epicsShareFunc void recGblGetTimeStamp(void *precord);
|
||||
epicsShareFunc void recGblTSELwasModified(struct link *plink);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ static int checkValues(epicsUInt32 s, epicsUInt32 i, epicsUInt32 e) {
|
||||
|
||||
static void testHead (char* title) {
|
||||
testDiag("--------------------------------------------------------");
|
||||
testDiag(title);
|
||||
testDiag("%s", title);
|
||||
testDiag("--------------------------------------------------------");
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ static int checkValues(myStruct *my,
|
||||
|
||||
static void testHead (char* title) {
|
||||
testDiag("--------------------------------------------------------");
|
||||
testDiag(title);
|
||||
testDiag("%s", title);
|
||||
testDiag("--------------------------------------------------------");
|
||||
}
|
||||
|
||||
|
||||
@@ -826,7 +826,8 @@ static void catMacroReplacements(subInfo *psubInfo,const char *value)
|
||||
newsize = psubInfo->curLength + len + 1;
|
||||
newbuf = calloc(1,newsize);
|
||||
if(!newbuf) {
|
||||
fprintf(stderr,"calloc failed for size %Zu\n",newsize);
|
||||
fprintf(stderr,"calloc failed for size %lu\n",
|
||||
(unsigned long) newsize);
|
||||
exit(1);
|
||||
}
|
||||
if(psubInfo->macroReplacements) {
|
||||
|
||||
@@ -70,7 +70,7 @@ int dbLoadRecords(const char *file, const char *macros)
|
||||
}
|
||||
|
||||
macExpandString(macHandle, input_buffer, output_buffer, BUFFER_SIZE-1);
|
||||
printf(output_buffer);
|
||||
printf("%s", output_buffer);
|
||||
|
||||
if (macHandle) macDeleteHandle(macHandle);
|
||||
|
||||
|
||||
@@ -607,7 +607,7 @@ int epicsShareAPI asDumpFP(
|
||||
fprintf(fp," %s",asLevelName[pasgclient->level]);
|
||||
else
|
||||
fprintf(fp," Illegal Level %d",pasgclient->level);
|
||||
if(pasgclient->access>=0 && pasgclient->access<=2)
|
||||
if(pasgclient->access<=2)
|
||||
fprintf(fp," %s %s",
|
||||
asAccessName[pasgclient->access],
|
||||
asTrapOption[pasgclient->trapMask]);
|
||||
@@ -812,7 +812,7 @@ int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
|
||||
fprintf(fp," %s",asLevelName[pasgclient->level]);
|
||||
else
|
||||
fprintf(fp," Illegal Level %d",pasgclient->level);
|
||||
if(pasgclient->access>=0 && pasgclient->access<=2)
|
||||
if(pasgclient->access<=2)
|
||||
fprintf(fp," %s %s",
|
||||
asAccessName[pasgclient->access],
|
||||
asTrapOption[pasgclient->trapMask]);
|
||||
|
||||
@@ -266,10 +266,8 @@ epicsShareFunc int errlogSevVprintf(
|
||||
epicsShareFunc char * epicsShareAPI errlogGetSevEnumString(
|
||||
const errlogSevEnum severity)
|
||||
{
|
||||
static char unknown[] = "unknown";
|
||||
|
||||
errlogInit(0);
|
||||
if (severity < 0 || severity > 3) return unknown;
|
||||
if (severity > 3) return "unknown";
|
||||
return errlogSevEnumString[severity];
|
||||
}
|
||||
|
||||
|
||||
@@ -112,9 +112,9 @@ static void createAndOpen(const char *chan, const char *json, const char *type,
|
||||
|
||||
static void testHead (const char *title, const char *typ = "") {
|
||||
const char *line = "------------------------------------------------------------------------------";
|
||||
testDiag(line);
|
||||
testDiag("%s", line);
|
||||
testDiag(title, typ);
|
||||
testDiag(line);
|
||||
testDiag("%s", line);
|
||||
}
|
||||
|
||||
#define TEST1(Size, Offset, Incr, Text) \
|
||||
|
||||
@@ -95,7 +95,7 @@ static void mustPassTwice(dbChannel *pch, db_field_log *pfl2, char* m, double d,
|
||||
|
||||
static void testHead (char* title) {
|
||||
testDiag("--------------------------------------------------------");
|
||||
testDiag(title);
|
||||
testDiag("%s", title);
|
||||
testDiag("--------------------------------------------------------");
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ static void fl_setup(dbChannel *chan, db_field_log *pfl, long val) {
|
||||
|
||||
static void testHead (char* title) {
|
||||
testDiag("--------------------------------------------------------");
|
||||
testDiag(title);
|
||||
testDiag("%s", title);
|
||||
testDiag("--------------------------------------------------------");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user