/Users/runner/work/STIR/STIR/build/src/swig/CMakeFiles/_stir.dir/stirPYTHON_wrap.cxx:5889:9: warning: '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. [-Wdeprecated-declarations]
5889 | sprintf(s, "%d, ", exact_dimensions[i]);
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | __deprecated_msg("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.")
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro '__deprecated_msg'
218 | #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
| ^
/Users/runner/work/STIR/STIR/build/src/swig/CMakeFiles/_stir.dir/stirPYTHON_wrap.cxx:5892:7: warning: '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. [-Wdeprecated-declarations]
5892 | sprintf(s, " or %d", exact_dimensions[n-1]);
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | __deprecated_msg("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.")
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro '__deprecated_msg'
218 | #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
| ^
/Users/runner/work/STIR/STIR/build/src/swig/CMakeFiles/_stir.dir/stirPYTHON_wrap.cxx:5929:11: warning: '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. [-Wdeprecated-declarations]
5929 | sprintf(s, "*,");
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | __deprecated_msg("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.")
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro '__deprecated_msg'
218 | #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
| ^
/Users/runner/work/STIR/STIR/build/src/swig/CMakeFiles/_stir.dir/stirPYTHON_wrap.cxx:5933:11: warning: '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. [-Wdeprecated-declarations]
5933 | sprintf(s, "%ld,", (long int)size[i]);
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | __deprecated_msg("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.")
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro '__deprecated_msg'
218 | #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
| ^
/Users/runner/work/STIR/STIR/build/src/swig/CMakeFiles/_stir.dir/stirPYTHON_wrap.cxx:5941:9: warning: '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. [-Wdeprecated-declarations]
5941 | sprintf(s, "%ld,", (long int)array_size(ary,i));
| ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | __deprecated_msg("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.")
| ^
During MacOS build STIR, the following warning is raised.
This backtracks to
numpy.i:numpy/tools/swig/numpy.i
Lines 456 to 463 in c5e9eda
numpy/tools/swig/numpy.i
Lines 494 to 514 in c5e9eda
The same issue has been mentioned in #30997. I'll create a PR that replaces
sprintfwithsnprintf.