mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Resolve sprintf warning
The latest verson of Xcode clang warns about using sprintf because of its inherent vulnerability. Change it to snprintf.
This commit is contained in:
parent
a15ea70ec7
commit
f275972e3b
@ -112,7 +112,7 @@ void PrintLabelledBlock(std::string label,
|
||||
inline std::string NumString(vtkm::Id number)
|
||||
{ // NumString()
|
||||
char strBuf[20];
|
||||
sprintf(strBuf, "%1d", static_cast<int>(number));
|
||||
snprintf(strBuf, 19, "%1d", static_cast<int>(number));
|
||||
return std::string(strBuf);
|
||||
} // NumString()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user