Clang warnings: sprintf() => epicsSnprintf()
This commit is contained in:
committed by
mdavidsaver
parent
11c7bc11c4
commit
7f9b6129e3
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <pv/serverContext.h>
|
||||
#include <pv/clientContextImpl.h>
|
||||
#include <epicsStdio.h>
|
||||
#include <epicsExit.h>
|
||||
#include <pv/standardPVField.h>
|
||||
#include <pv/pvTimeStamp.h>
|
||||
@@ -273,7 +274,7 @@ static epics::pvData::PVStructure::shared_pointer createNTTable(int columnsCount
|
||||
PVStringArray::svector labels(columnsCount);
|
||||
for (int i = 0; i < columnsCount; i++)
|
||||
{
|
||||
sprintf(sbuf, "column%d", i);
|
||||
epicsSnprintf(sbuf, sizeof(sbuf), "column%d", i);
|
||||
fieldNames[i] = sbuf;
|
||||
fields[i] = getFieldCreate()->createScalarArray(pvDouble);
|
||||
labels[i] = sbuf;
|
||||
@@ -315,7 +316,7 @@ static epics::pvData::PVStructure::shared_pointer createNTNameValue(int columnsC
|
||||
PVStringArray::svector labels(columnsCount);
|
||||
for (int i = 0; i < columnsCount; i++)
|
||||
{
|
||||
sprintf(sbuf, "name%d", i);
|
||||
epicsSnprintf(sbuf, sizeof(sbuf), "name%d", i);
|
||||
fieldNames[i] = sbuf;
|
||||
fields[i] = getFieldCreate()->createScalarArray(pvDouble);
|
||||
labels[i] = sbuf;
|
||||
@@ -1318,7 +1319,7 @@ public:
|
||||
PVStringArray::svector labels(columnsCount);
|
||||
for (int i = 0; i < columnsCount; i++)
|
||||
{
|
||||
sprintf(sbuf, "name%d", i);
|
||||
epicsSnprintf(sbuf, sizeof(sbuf), "name%d", i);
|
||||
labels[i] = sbuf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user