Modify

Opened 6 years ago

Closed 6 years ago

#6185 closed Bugs (fixed)

_SCL_SECURE_NO_WARNINGS macro redefinition in Boost.Move

Reported by: a.tinsmith@… Owned by: Ion Gaztañaga
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 (0)

Change History (3)

comment:1 Changed 6 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 6 years ago by anonymous

Severity: ProblemRegression

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

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

comment:3 Changed 6 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Fixed in trunk

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.