core icon indicating copy to clipboard operation
core copied to clipboard

Error Compiling on gcc 8.1.0

Open JaredCrean2 opened this issue 6 years ago • 1 comments

When compiling with gcc 8.1.0 on BGRES (newly renamed to DCS)

/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc: In function ‘int main(int, char**)’:
/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc:80:21: error: ‘%s’ directive writing up to 255 bytes into a region of size 32 [-Werror=format-overflow=]
   sprintf(vtk_fname,"%s",without_extension);
                     ^~~~ ~~~~~~~~~~~~~~~~~
/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc:80:10: note: ‘sprintf’ output between 1 and 256 bytes into a destination of size 32
   sprintf(vtk_fname,"%s",without_extension);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc:85:21: error: ‘%s’ directive writing up to 255 bytes into a region of size 32 [-Werror=format-overflow=]
   sprintf(vtk_fname,"%s-ghosted",without_extension);
                     ^~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc:85:10: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 32
   sprintf(vtk_fname,"%s-ghosted",without_extension);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc:90:21: error: ‘%s’ directive writing up to 255 bytes into a region of size 32 [-Werror=format-overflow=]
   sprintf(vtk_fname,"%s-ghosted-copy",without_extension);
                     ^~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
/gpfs/u/home/ODLC/ODLCjrcr/barn-shared/BGRS/archives/core/test/xgc_split.cc:90:10: note: ‘sprintf’ output between 14 and 269 bytes into a destination of size 32
   sprintf(vtk_fname,"%s-ghosted-copy",without_extension);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

This same commit of pumi build correctly on the Scorec workstations with gcc 7.3.0.

JaredCrean2 avatar Apr 13 '19 00:04 JaredCrean2

Thank you.

cwsmith avatar Apr 13 '19 00:04 cwsmith