Opened 6 years ago

Closed 6 years ago

#12230 closed Bugs (fixed)

strerror deprecated in favor of strerror_s in VS2015

Reported by: Steve Hickman <steve.hickman@…> Owned by: Emil Dotchevski
Milestone: To Be Determined Component: exception
Version: Boost 1.61.0 Severity: Optimization
Keywords: Cc:

Description

Compiling with VS2015 on Win7 64 bit building a 32 bit exe: I get the following error:

3>c:\boost\boost_1_61_0\boost\exception\errinfo_errno.hpp(36): error 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.

While I can work around this by using _CRT_SECURE_NO_WARNINGS, that flies in the face of what Boost is about - namely quality. I don't want to do something that weakens my ability to detect unsafe code.

Change History (3)

comment:1 by Emil Dotchevski, 6 years ago

Try inserting the following line after line 12 in errinfo_errno.hpp:

#pragma warning(disable:4996)

Let me know if this solves your problem, and I'll fix it in the next release.

comment:2 by steve.hickman@…, 6 years ago

That change appears to solve the problem.

comment:3 by Emil Dotchevski, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.