LLNL / hiop

HPC solver for nonlinear optimization problems
Other
210 stars 42 forks source link

Update CMake file and use vsnprintf to avoid compiling errors #673

Closed nychiang closed 11 months ago

nychiang commented 11 months ago
  1. Compiler flags -Wall and -Werror are only used in the debug mode;
  2. Change vsprintf to vsnprintf, otherwise when -Werror is given, we got multiple errors such as
    /hiop/src/Utils/hiopLogger.cpp:147:3: error: 'vsprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use vsnprintf(3) instead. [-Werror,-Wdeprecated-declarations]
    vsprintf(buff_,format, args);

@jaelynlitz @cameronrutherford @cnpetra