JeffersonLab / JANA2

Multi-threaded HENP Event Reconstruction
https://jeffersonlab.github.io/JANA2/
Other
6 stars 9 forks source link

Fix compiler warnings about sprintf #213

Closed faustus123 closed 1 year ago

faustus123 commented 1 year ago

On macos with Apple clang 14.0.0, there were warnings about sprintf being deprecated as unsafe with a suggestion to replace it with snprintf. This makes those substitutions.

This also includes several other non-substantive changes to address compiler warnings. Primarily unused parameters.

This now builds clean of warnings on macos with Apple clang14.0.0 when using:

CMAKE_CXX_STANDARD=17 USE_ROOT=1 USE_PYTHON=1 USE_ZEROMQ=1 USE_XERCES=1

CMAKE_CXX_STANDARD=20 USE_PYTHON=1 USE_ZEROMQ=1 USE_XERCES=1

I was unable to test with c++20 and ROOT since root 6.28.00 failed to build with c++20.

In both cases above, janatests ran successfully