Isorropia example error: format not a string literal and no format arguments
Created by: sagitter
Hi all.
Isorropia
"order_example" does not compile with following error:
/builddir/build/BUILD/trilinos-12.8.1/buildopenmpi_dir/packages/isorropia/example/order_example.cpp: In function 'int main(int, char**)':
/builddir/build/BUILD/trilinos-12.8.1/buildopenmpi_dir/packages/isorropia/example/order_example.cpp:116:42: error: format not a string literal and no format arguments [-Werror=format-security]
sprintf(file_name, MMFileName.c_str());
^
cmake
configuration (MPI enabled):
+ /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release '-DCMAKE_C_FLAGS_RELEASE:STRING=-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 -Wl,-z,relro -fPIC -Wl,-z,now' '-DCMAKE_CXX_FLAGS_RELEASE:STRING=-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 -Wl,-z,relro -fPIC -Wl,-z,now' '-DCMAKE_Fortran_FLAGS_RELEASE:STRING=-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 -Wl,-z,relro -fPIC -Wl,-z,now' '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fPIC -pie -Wl,-z,now -Wl,--as-needed' -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES -DBUILD_SHARED_LIBS:BOOL=ON -DTPL_ENABLE_MPI=ON -DMPI_BASE_DIR= -DTrilinos_ENABLE_FORTRAN=ON -DTrilinos_ENABLE_TESTS:BOOL=ON -DTrilinos_ENABLE_OpenMP=ON -DTrilinos_ENABLE_PyTrilinos:BOOL=ON -DTPL_ENABLE_MPI4PY:BOOL=ON -DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON -DPyTrilinos_INSTALL_PREFIX:PATH=/usr/lib64 -DPYTHON_VERSION:STRING=2.7 -DTpetra_INST_SERIAL:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE=TRUE -DTrilinos_VERBOSE_CONFIGURE=OFF -DTrilinos_ENABLE_CXX11=ON -DTrilinos_INSTALL_INCLUDE_DIR=/usr/include/openmpi-x86_64/trilinos -DTrilinos_INSTALL_LIB_DIR=/usr/lib64/openmpi/lib -DTrilinos_INSTALL_RUNTIME_DIR=/usr/lib64/openmpi/bin -DTrilinos_INSTALL_EXAMPLE_DIR=/usr/share/trilinos/examples -DTrilinos_ENABLE_STRONG_C_COMPILE_WARNINGS=OFF -DTrilinos_ENABLE_STRONG_CXX_COMPILE_WARNINGS=OFF -DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON -DTPL_ENABLE_gtest:BOOL=OFF -DTrilinos_ENABLE_STK:BOOL=OFF -DTrilinos_ENABLE_ALL_PACKAGES=ON ..