I have encountered the following warning. I am using AppleClang 14.0.0.14000029
peglib.h:4804:13: 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]
sprintf(buff, "%4s %10s %5s %10.2f %10.2f %s", "", "", "",
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__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.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
I have encountered the following warning. I am using AppleClang 14.0.0.14000029
I have replaced
sprintf
withsnprintf
at line4800
,4804
and4814
of my local copy as follows:snprintf(buff, BUFSIZ, ...
This solved the warning