EarthScope / evalresp

Evaluates instrument responses in FDSN and derivative formats
GNU Lesser General Public License v3.0
11 stars 2 forks source link

4.0.6 doesn't compile with gcc 7.3.1 #70

Closed andrewcooke-isti closed 5 years ago

andrewcooke-isti commented 5 years ago
print_fctns.c: In function ‘print_resp_itp’:
print_fctns.c:328:53: error: ‘%s’ directive writing up to 63 bytes into a region of size between 60 and 249 [-Werror=format-overflow=]
                     sprintf(filename, "AMP.%s.%s.%s.%s", resp->network,
                                                     ^~
print_fctns.c:328:21: note: ‘sprintf’ output between 8 and 260 bytes into a destination of size 256
                     sprintf(filename, "AMP.%s.%s.%s.%s", resp->network,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             resp->station, resp->locid, resp->channel);
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print_fctns.c:334:55: error: ‘%s’ directive writing up to 63 bytes into a region of size between 58 and 247 [-Werror=format-overflow=]
                     sprintf(filename, "PHASE.%s.%s.%s.%s", resp->network,
                                                       ^~
print_fctns.c:334:21: note: ‘sprintf’ output between 10 and 262 bytes into a destination of size 256
                     sprintf(filename, "PHASE.%s.%s.%s.%s", resp->network,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             resp->station, resp->locid, resp->channel);
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print_fctns.c:385:53: error: ‘%s’ directive writing up to 63 bytes into a region of size between 60 and 249 [-Werror=format-overflow=]
                     sprintf(filename, "FAP.%s.%s.%s.%s", resp->network,
                                                     ^~
print_fctns.c:385:21: note: ‘sprintf’ output between 8 and 260 bytes into a destination of size 256
                     sprintf(filename, "FAP.%s.%s.%s.%s", resp->network,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             resp->station, resp->locid, resp->channel);
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print_fctns.c:440:53: error: ‘%s’ directive writing up to 63 bytes into a region of size between 56 and 245 [-Werror=format-overflow=]
                 sprintf(filename, "SPECTRA.%s.%s.%s.%s", resp->network,
                                                     ^~
print_fctns.c:440:17: note: ‘sprintf’ output between 12 and 264 bytes into a destination of size 256
                 sprintf(filename, "SPECTRA.%s.%s.%s.%s", resp->network,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         resp->station, resp->locid, resp->channel);
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:401: print_fctns.lo] Error 1
make[2]: Leaving directory '/home/andrew/pkg/evalresp-4.0.6/src'
make[1]: *** [Makefile:296: all-recursive] Error 1
make[1]: Leaving directory '/home/andrew/pkg/evalresp-4.0.6'
make: *** [Makefile:225: all] Error 2
andrew@linux-3yyu:~/pkg/evalresp-4.0.6> gcc --version
gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
andrewcooke-isti commented 5 years ago
./configure --enable-unsafe

gets it compiled.

chad-earthscope commented 5 years ago

v5.0.0 compiles with GCC 8.