-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sprintf deprecation error failing build on macOS #4478
Comments
ghmanoj
changed the title
sprintf deprecation warning on macOS error while building
sprintf deprecation error failing build on macOS
Dec 20, 2022
The patch below fixes the build. It replaces the
|
@ghmanoj If you surround the code with lines with three backticks `, So like ```diff Looks like first line
-Code diff
+Code diff
bar |
Seeing the same error on latest MacOS.
@ghmanoj can you send a pull request? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
Build is failing in macOS 13.1
Environment
OS: macOS 13.1
Build Environment:
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Minimal test code / Steps to reproduce the issue
Run the following command after git clone:
What's the actual result? (include assertion message & call stack if applicable)
make[1]: Nothing to be done for `all'.
CXX src/libzmq_la-tcp_address.lo
src/tcp_address.cpp:132:12: 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. [-Werror,-Wdeprecated-declarations]
pos += sprintf (pos, "%d", ntohs (port_));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.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.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
1 error generated.
make[1]: *** [src/libzmq_la-tcp_address.lo] Error 1
make: *** [all-recursive] Error 1
What's the expected result?
Build should pass
The text was updated successfully, but these errors were encountered: