Modify

Ticket #6185 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

_SCL_SECURE_NO_WARNINGS macro redefinition in Boost.Move

Reported by: a.tinsmith@… Owned by: igaztanaga
Milestone: To Be Determined Component: move
Version: Boost 1.48.0 Severity: Regression
Keywords: _SCL_SECURE_NO_WARNINGS C4005 Cc:

Description

In the "boost/move/move.hpp" (line 28) header file _SCL_SECURE_NO_WARNINGS macro is defined without checking whether previous definition exists:

#ifdef BOOST_MSVC
   #ifndef _CRT_SECURE_NO_DEPRECATE
   #define  BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
   #define _CRT_SECURE_NO_DEPRECATE
   #define _SCL_SECURE_NO_WARNINGS
   #endif
   #pragma warning (push)
   #pragma warning(disable:4996)
#endif

Correct code:

#ifdef BOOST_MSVC
   #ifndef _CRT_SECURE_NO_DEPRECATE
   #define  BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
   #define _CRT_SECURE_NO_DEPRECATE
   #endif
   #ifndef _SCL_SECURE_NO_WARNINGS
   #define _SCL_SECURE_NO_WARNINGS
   #endif
   #pragma warning (push)
   #pragma warning(disable:4996)
#endif

Attachments

Change History

comment:1 follow-up: ↓ 2 Changed 2 years ago by Olaf van der Spek <olafvdspek@…>

IMO the severity should be a bit higher. This produces lots of warnings.

comment:2 in reply to: ↑ 1 Changed 2 years ago by anonymous

  • Severity changed from Problem to Regression

Replying to Olaf van der Spek <olafvdspek@…>:

IMO the severity should be a bit higher. This produces lots of warnings.

comment:3 Changed 2 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in trunk

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.