Skip to content
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

'strerror' in amqp_openssl.c warns in MSVC #588

Closed
svaningelgem opened this issue Dec 21, 2019 · 1 comment · Fixed by #589
Closed

'strerror' in amqp_openssl.c warns in MSVC #588

svaningelgem opened this issue Dec 21, 2019 · 1 comment · Fixed by #589

Comments

@svaningelgem
Copy link

I get these warnings under MSVC:

2>amqp_openssl.c
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(549,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(554,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(564,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(566,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(613,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(625,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(631,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(652,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(657,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(663,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(669,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'
2>E:\SVN\EncodedSites\debian_package_repository\monican\to_compile\program\lib\rabbitmq-c\librabbitmq\amqp_openssl.c(710,1): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(182): message : see declaration of 'strerror'

In amqp_socket.c these are silenced by doing:

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

So I would propose to do the same in the openssl file.

Thanks!

alanxz added a commit that referenced this issue Dec 25, 2019
These warnings have been disabled in other parts of the code and are
generally harmless. Recent refactoring in the amqp_openssl.c file have
caused these warnings to appear.

Fixes: #588
alanxz added a commit that referenced this issue Dec 25, 2019
These warnings have been disabled in other parts of the code and are
generally harmless. Recent refactoring in the amqp_openssl.c file have
caused these warnings to appear.

Fixes: #588
@alanxz
Copy link
Owner

alanxz commented Dec 25, 2019

Good suggestion, should be fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants