UCBerkeleySETI / bl_sigproc

Breakthrough Listen fork of SigProc tools
2 stars 0 forks source link

open_files.c:25:20: error: format not a string literal and no format arguments #4

Closed gijzelaerr closed 6 years ago

gijzelaerr commented 6 years ago

The build on the launchpad PPA failed, probaby since their compiler flags are quite strict. I think this has to do with insecure formatting of a print.

gcc -DHAVE_CONFIG_H -I. -I.. . -DPSRFITS -I/include  -DFFTW_THREADS  -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include  -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/bl-sigproc-0+git20180302=. -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -DHAVE_OPENMP -c -o open_files.o open_files.c
open_files.c: In function ‘open_files’:
open_files.c:25:20: error: format not a string literal and no format arguments [-Werror=format-security]
   sprintf(outfile, dir1);
                    ^~~~
cc1: some warnings being treated as errors
Makefile:1523: recipe for target 'open_files.o' failed
make[4]: *** [open_files.o] Error 1
make[4]: Leaving directory '/<<BUILDDIR>>/bl-sigproc-0+git20180302/src'
Makefile:1002: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/<<BUILDDIR>>/bl-sigproc-0+git20180302/src'
Makefile:444: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1