tpaviot / smesh

An extension to oce, provides advanced meshing features
69 stars 24 forks source link

smesh 6.7.3 fails to build with GCC 7 #43

Closed hobbes1069 closed 7 years ago

hobbes1069 commented 7 years ago

6.7.2 built fine but I get the following error with gcc 7 in Fedora Rawhide:

[ 65%] Building C object src/CMakeFiles/MEFISTO2.dir/MEFISTO2/trte.c.o
cd /builddir/build/BUILD/smesh-6.7.3/build/src && /usr/bin/cc -DCSFDB -DHAVE_CONFIG_H -DLIN -DMEFISTO2_EXPORTS -DOCC_CONVERT_SIGNALS -D_OCC64 -I/builddir/build/BUILD/smesh-6.7.3 -I/builddir/build/BUILD/smesh-6.7.3/inc -I/usr/lib64/oce-0.18/../../include/oce  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/MEFISTO2.dir/MEFISTO2/trte.c.o   -c /builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c
make[2]: Entering directory '/builddir/build/BUILD/smesh-6.7.3/build'
/builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c: In function 'do_lio':
/builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c:19:5: error: format not a string literal and no format arguments [-Werror=format-security]
     printf(ptr);
     ^~~~~~
/builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c: In function 'do_fio':
/builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c:25:5: error: format not a string literal and no format arguments [-Werror=format-security]
     printf(ptr);
     ^~~~~~
/builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c: In function 'fasoar_':
/builddir/build/BUILD/smesh-6.7.3/src/MEFISTO2/trte.c:615:50: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
      if (nosoar[*noar * nosoar_dim1 + 4] != *nt1 && nosoar[*noar *
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
       nosoar_dim1 + 4] != *nt2 || nosoar[*noar * nosoar_dim1 +
       ~~~~~~~~~~~~~~~~~~~~~~~~

I also got an error with gcc 6.3.1 in Fedora 25 but haven't checked to see if it's the same error or not yet.

tpaviot commented 7 years ago

@hobbes1069 Thank you for your feedback, can you please test the review/674-dev branch ? and ensure the tests pass

hobbes1069 commented 7 years ago

Builds completed without error on both Fedora 25 and Rawhide. Thanks!