GCC8 error in pulsar/Fscan/spec_avg.c
Building LALApps with GCC8 results in the following errors:
spec_avg.c: In function 'main':
spec_avg.c:163:26: error: '_timestamps' directive writing 11 bytes into a region of size between 1 and 256 [-Werror=format-overflow=]
sprintf(outfile2, "%s_timestamps", outbase);/*cg: name of second file to be output*/
^~~~~~~~~~~
spec_avg.c:163:5: note: 'sprintf' output between 12 and 267 bytes into a destination of size 256
sprintf(outfile2, "%s_timestamps", outbase);/*cg: name of second file to be output*/
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spec_avg.c:165:26: error: '_timeaverage' directive writing 12 bytes into a region of size between 1 and 256 [-Werror=format-overflow=]
sprintf(outfile3, "%s_timeaverage", outbase); /* Use the old outfile3 name from this code; python code will output the .txt version of this file. */
^~~~~~~~~~~~
spec_avg.c:165:5: note: 'sprintf' output between 13 and 268 bytes into a destination of size 256
sprintf(outfile3, "%s_timeaverage", outbase); /* Use the old outfile3 name from this code; python code will output the .txt version of this file. */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spec_avg.c:166:26: error: '_date' directive writing 5 bytes into a region of size between 1 and 256 [-Werror=format-overflow=]
sprintf(outfile4, "%s_date", outbase);/*cg;file for outputting the date, which is used in matlab plotting.*/
^~~~~
spec_avg.c:166:5: note: 'sprintf' output between 6 and 261 bytes into a destination of size 256
sprintf(outfile4, "%s_date", outbase);/*cg;file for outputting the date, which is used in matlab plotting.*/
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors