Misc/Microtonal: fix gcc compiler warning
gcc warns about possible unintended string operation truncation. This commit
change the code to make it detected by gcc as an intended string truncation,
thus fixing the warning.
This commit fixes the warning:
src/Misc/Microtonal.cpp: In static member function ‘static int zyn::Microtonal::loadscl(zyn::SclInfo&, const char*)’:
src/Misc/Microtonal.cpp:640:12: warning: ‘char* strncpy(char*, const char*, size_t)’ output may be truncated copying 119 bytes from a string of length 499 [-Wstringop-truncation]
640 | strncpy(scl.Pname, tmp, MICROTONAL_MAX_NAME_LEN);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Misc/Microtonal.cpp:641:12: warning: ‘char* strncpy(char*, const char*, size_t)’ output may be truncated copying 119 bytes from a string of length 499 [-Wstringop-truncation]
641 | strncpy(scl.Pcomment, tmp, MICROTONAL_MAX_NAME_LEN);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note: this warning is reported by gcc 11.2.1, on Fedora 35.
Signed-off-by: Julien Olivain <ju.o@free.fr>