Skip to content
Snippets Groups Projects
Commit 90528ee2 authored by Christoph Pohl's avatar Christoph Pohl
Browse files

Suppress -Wstringop-truncation warning in ObjectIO.cpp

Added #pragma compiler directives to ignore -Wstringop-truncation warning in strncpy function. This change ensures that the warning triggered by the strncpy function doesn't interfere with the build process, improving build stability.
parent 19ff02de
No related branches found
No related tags found
No related merge requests found
......@@ -252,8 +252,10 @@ namespace VirtualRobot
{
// copy string content to char array
std::vector<char> y(xmlString.size() + 1);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
strncpy(y.data(), xmlString.c_str(), xmlString.size() + 1);
#pragma GCC diagnostic pop
VirtualRobot::ManipulationObjectPtr obj;
try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment