strncpy in lalapps triggers gnu warning (treated as error)
Here is the error, with a suggested solution from Adam. Not sure who is in charge of that bit of code (@adam-mercer can you please re-assign as appropriate?)
`make[5]: Entering directory
'/home/svitale/lalsuites/gitlab/src/lalapps/src/findchirp'
CC ivana.o
ivana.c: In function ‘main’:
ivana.c:371:2: error: ‘strncpy’ specified bound 256 equals destination
size [-Werror=stringop-truncation]
strncpy( vetoRangeFile, val, sizeof(vetoRangeFile) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ivana.c:385:2: error: ‘strncpy’ specified bound 256 equals destination
size [-Werror=stringop-truncation]
strncpy( unusedVetoFile, val, sizeof(unusedVetoFile) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ivana.c:357:2: error: ‘strncpy’ specified bound 256 equals destination
size [-Werror=stringop-truncation]
strncpy( outFile, val, sizeof(outFile) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ivana.c:321:2: error: ‘strncpy’ specified bound 256 equals destination
size [-Werror=stringop-truncation]
strncpy( outFile, arg, sizeof(outFile) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ivana.c:273:4: error: ‘strncpy’ specified bound 1024 equals
destination size [-Werror=stringop-truncation]
strncpy( vetospec, chptr, sizeof(vetospec) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ivana.c:208:2: error: ‘strncpy’ specified bound 256 equals destination
size [-Werror=stringop-truncation]
strncpy( candFile, arg, sizeof(candFile) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:754: ivana.o] Error 1`
They are GCC8 related, and easy to fix for example line 208 should be changed to: strncpy(candFile, arg, sizeof(candFile) - 1);