Opened 11 years ago

Closed 11 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

Change History (3)

comment:1 by Olaf van der Spek <olafvdspek@…>, 11 years ago

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

in reply to:  1 comment:2 by anonymous, 11 years ago

Severity: ProblemRegression

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

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

comment:3 by Ion Gaztañaga, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk

Note: See TracTickets for help on using tickets.