We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm seeing some of these new warnings in nc_perf directory, where I am adding a test. I will fix and submit as part of my next PR.
tst_create_files.c: In function ‘main’: tst_create_files.c:285:31: warning: ‘%s’ directive writing up to 256 bytes into a region of size 253 [-Wformat-overflow=] 285 | sprintf(file_name, "tst_%s2_%dD.nc", type_name[t], ndims); | ^~ tst_create_files.c:285:7: note: ‘sprintf’ output between 12 and 278 bytes into a destination of size 257 285 | sprintf(file_name, "tst_%s2_%dD.nc", type_name[t], ndims); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tst_create_files.c:173:31: warning: ‘%s’ directive writing up to 256 bytes into a region of size 253 [-Wformat-overflow=] 173 | sprintf(file_name, "tst_%s2_%dD.nc", type_name[t], ndims); | ^~ tst_create_files.c:173:7: note: ‘sprintf’ output between 12 and 278 bytes into a destination of size 257 173 | sprintf(file_name, "tst_%s2_%dD.nc", type_name[t], ndims); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /bin/bash ../libtool --tag=CC --mode=link mpicc -g -Wall ../liblib/libnetcdf.la -L/usr/local/hdf5-1.10.6_szip_mpich/lib -o tst_create_files tst_create_files.o ../liblib/libnetcdf.la -lhdf5_hl -lhdf5 -lm -ldl -lz -lcurl libtool: link: mpicc -g -Wall -o tst_create_files tst_create_files.o -L/usr/local/hdf5-1.10.6_szip_mpich/lib -L/usr/local/szip-2.1.1/lib ../liblib/.libs/libnetcdf.a /usr/local/hdf5-1.10.6_szip_mpich/lib/libhdf5_hl.so /usr/local/hdf5-1.10.6_szip_mpich/lib/libhdf5.so /usr/local/szip-2.1.1/lib/libsz.so -lm -ldl -lz /usr/lib/x86_64-linux-gnu/libcurl.so -pthread -Wl,-rpath -Wl,/usr/local/hdf5-1.10.6_szip_mpich/lib -Wl,-rpath -Wl,/usr/local/szip-2.1.1/lib -Wl,-rpath -Wl,/usr/local/hdf5-1.10.6_szip_mpich/lib -Wl,-rpath -Wl,/usr/local/szip-2.1.1/lib depbase=`echo bm_file.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ mpicc -DHAVE_CONFIG_H -I. -I.. -I../include -I../oc2 -I/usr/local/hdf5-1.10.6_szip_mpich/include -g -Wall -MT bm_file.o -MD -MP -MF $depbase.Tpo -c -o bm_file.o bm_file.c &&\ mv -f $depbase.Tpo $depbase.Po bm_file.c: In function ‘main’: bm_file.c:1078:39: warning: ‘%s’ directive writing up to 256 bytes into a region of size 248 [-Wformat-overflow=] 1078 | sprintf(file_out_2, "tst_copy_%s", file_out); | ^~ ~~~~~~~~ bm_file.c:1078:9: note: ‘sprintf’ output between 10 and 266 bytes into a destination of size 257 1078 | sprintf(file_out_2, "tst_copy_%s", file_out); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bm_file.c:1079:33: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=] 1079 | sprintf(cmd, "cp %s %s\n", file_out, file_out_2); | ^ bm_file.c:1079:9: note: ‘sprintf’ output between 6 and 518 bytes into a destination of size 517 1079 | sprintf(cmd, "cp %s %s\n", file_out, file_out_2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ depbase=`echo tst_utils.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I'm seeing some of these new warnings in nc_perf directory, where I am adding a test. I will fix and submit as part of my next PR.
The text was updated successfully, but these errors were encountered: