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
The correct approach is to use strncpy(gm, "EN", 3); or memcpy(gm, "EN", 2); and remove the #pragma.
And the function signature can be changed to int readmn(FILE*, FILE*, char[3], int*, int*, int*, int*, nec_float*, nec_float*, nec_float*, nec_float*, nec_float*, nec_float*).
This allows the compiler to check the array bounds at compile time.
The text was updated successfully, but these errors were encountered:
This pragma is incompatible with older GCCs and CLANG:
necpp/src/nec2cpp.cpp
Lines 590 to 593 in 870f110
The correct approach is to use
strncpy(gm, "EN", 3);
ormemcpy(gm, "EN", 2);
and remove the#pragma
.And the function signature can be changed to
int readmn(FILE*, FILE*, char[3], int*, int*, int*, int*, nec_float*, nec_float*, nec_float*, nec_float*, nec_float*, nec_float*)
.This allows the compiler to check the array bounds at compile time.
The text was updated successfully, but these errors were encountered: