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

@@ -6,7 +6,7 @@
#include <iostream>
#include <sstream>
#include <vector>
#include <stdio.h>
#include <epicsStdio.h>
#include <epicsStdlib.h>
#include <epicsGetopt.h>
#include <epicsExit.h>
@@ -138,7 +138,7 @@ int main (int argc, char *argv[])
char buf[16];
for (size_t i = 0; i < nChannels; i++)
{
sprintf(buf, "test%zu", (i+1));
epicsSnprintf(buf, sizeof(buf), "test%zu", (i+1));
channels.push_back(provider->createChannel(buf, channelRequester));
}