More clang warning clean-ups

The short => int change is a UB issue, the second argument to va_start()
must be of a type that does not undergo promotion. See
https://wiki.sei.cmu.edu/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
This commit is contained in:
Andrew Johnson
2018-02-09 11:29:16 -06:00
parent bf91275200
commit 550beeab9f
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -111,7 +111,7 @@ long testdbVPutField(const char* pv, short dbrType, va_list ap)
return dbPutField(&addr, dbrType, pod.bytes, 1);
}
void testdbPutFieldOk(const char* pv, short dbrType, ...)
void testdbPutFieldOk(const char* pv, int dbrType, ...)
{
long ret;
va_list ap;
@@ -123,7 +123,7 @@ void testdbPutFieldOk(const char* pv, short dbrType, ...)
testOk(ret==0, "dbPutField(%s, %d, ...) == %ld", pv, dbrType, ret);
}
void testdbPutFieldFail(long status, const char* pv, short dbrType, ...)
void testdbPutFieldFail(long status, const char* pv, int dbrType, ...)
{
long ret;
va_list ap;
@@ -138,7 +138,7 @@ void testdbPutFieldFail(long status, const char* pv, short dbrType, ...)
testFail("dbPutField(\"%s\", %d, ...) != %ld (%ld)", pv, dbrType, status, ret);
}
void testdbGetFieldEqual(const char* pv, short dbrType, ...)
void testdbGetFieldEqual(const char* pv, int dbrType, ...)
{
va_list ap;
+3 -3
View File
@@ -46,13 +46,13 @@ epicsShareFunc void testdbCleanup(void);
* testdbPutFieldOk("pvname", DBF_FLOAT, (double)4.1);
* testdbPutFieldOk("pvname", DBF_STRING, "hello world");
*/
epicsShareFunc void testdbPutFieldOk(const char* pv, short dbrType, ...);
epicsShareFunc void testdbPutFieldOk(const char* pv, int dbrType, ...);
/* Tests for put failure */
epicsShareFunc void testdbPutFieldFail(long status, const char* pv, short dbrType, ...);
epicsShareFunc void testdbPutFieldFail(long status, const char* pv, int dbrType, ...);
epicsShareFunc long testdbVPutField(const char* pv, short dbrType, va_list ap);
epicsShareFunc void testdbGetFieldEqual(const char* pv, short dbrType, ...);
epicsShareFunc void testdbGetFieldEqual(const char* pv, int dbrType, ...);
epicsShareFunc void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap);
/**