Clang warnings: sprintf() => epicsSnprintf()

This commit is contained in:
Andrew Johnson
2025-11-19 16:37:10 -06:00
committed by mdavidsaver
parent 11c7bc11c4
commit 7f9b6129e3
5 changed files with 14 additions and 13 deletions

View File

@@ -3,7 +3,7 @@
#include <pv/clientFactory.h>
#include <pv/pvAccess.h>
#include <stdio.h>
#include <epicsStdio.h>
#include <epicsStdlib.h>
#include <epicsGetopt.h>
#include <epicsThread.h>
@@ -286,9 +286,9 @@ void runTest()
for (int i = 0; i < channels; i++)
{
if (arraySize > 0)
sprintf(buf, "testArray%d_%d", arraySize, i);
epicsSnprintf(buf, sizeof(buf), "testArray%d_%d", arraySize, i);
else
sprintf(buf, "test%d", i);
epicsSnprintf(buf, sizeof(buf), "test%d", i);
channelNames.push_back(buf);
}