You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
../src/common/normApp.cpp:617:20: warning: ‘void operator delete(void*, long unsigned int)’ called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
617 | delete address;
| ^~~~~~~
../src/common/normApp.cpp:607:39: note: returned from ‘void* operator new [](long unsigned int)’
607 | if (!(address = new char[len+1]))
and
../src/common/normPostProcess.cpp: In member function ‘void NormPostProcessor::GetCommand(char*, unsigned int)’:
../src/common/normPostProcess.cpp:51:20: warning: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
51 | strncpy(buffer, "none", 4);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~
both seem to indicate genuine errors.
The former should be changed to "delete[] address" (also in the lines 606 and 626 even though g++ did not notice).
About the latter, I am not sure as the enclosing function NormPostProcessor::GetCommand does not seem to be used so intentions are unclear. Unless it is there for future use, I think the safest would be to remove the function.
The text was updated successfully, but these errors were encountered:
While compiling normApp.cpp
and
both seem to indicate genuine errors.
The former should be changed to "delete[] address" (also in the lines 606 and 626 even though g++ did not notice).
About the latter, I am not sure as the enclosing function
NormPostProcessor::GetCommand
does not seem to be used so intentions are unclear. Unless it is there for future use, I think the safest would be to remove the function.The text was updated successfully, but these errors were encountered: