CI macos image deprecates sprintf
The macos-latest GitHub Actions image switched to Xcode 14.2 recently, which deprecates sprintf (and possibly other functions?). This breaks -Werror builds, which includes the pre-commit builds running on each PR. The use of sprintf is quite widespread (over 400 occurrences).
For the short term, should we disable -Wdeprecated-declarations for macos builds, to unblock the automated checks?
For the longer term, should we migrate all sprintf calls to alternatives like snprintf?
for the reference, error message says:
test_read_1D.cpp:1082:5: error: 'sprintf' 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 snprintf(3) instead.
I will look at this - adding -Wdeprecated-declarations if possible just for macos. I might venture into the 400 changes if I have a rainy Sunday
I might venture into the 400 changes if I have a rainy Sunday
@MeyeChris if you decide to do so, I'd suggest doing them in batches as it will make reviews a bit more manageable (plus you don't have to wait for a day with bad weather ;)). But perhaps we should first reach consensus from others on whether we want to do this; sprintf isn't deprecated by POSIX yet afaict.