Closed jwijffels closed 5 years ago
Try to use a GCC-7 or even GCC-6 to compile the program.
Take also a look at the documentation on the warning you got: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
The warning comes from the CRAN build machines (in this case Debian with gcc-8) which I do not control, nor am I allowed to tweak specific compiler settings which ignore these -Wstring-truncation and the CRAN policy also disallows setting pragma's.
Is there another way of rewriting
strncpy((char*)header.chunkid, CHUNKID, 4);
and strncpy((char*)db->header.chunkid, (const char*)p, 4);
such that the -Wstringop-truncation warnings will disappear while still keeping the functionality (which basically sees if the header of the file is of type CQDB)?
Never mind. Made the following change which worked out fine: https://github.com/bnosac/crfsuite/commit/19412d0f1659ff8f5735cb12aaaa342eede5055e
Hello,
I'm trying to publish the R package which wraps CRFsuite to CRAN (https://github.com/bnosac/crfsuite). CRAN complains about the cqdb in the lib folder, the check system running gcc-8 on Debian gives the following warning when compiling cqdb.c which is in
lib/cqdb/src/cqdb.c
Is there a way on how to fix these issues?many thanks for any input.