Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10092 closed Bugs (fixed)

deque.hpp: warning C4701: potentially uninitialized local variable 'cur' used

Reported by: Michel Lemay <mlemay@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Under VS2012:

dependencies\boost\boost\container\deque.hpp(454): warning C4701: potentially uninitialized local variable 'cur' used dependencies\boost\boost\container\deque.hpp(454): warning C4703: dependencies\boost\boost\container\deque.hpp(1907): warning C4701: potentially uninitialized local variable 'i' used

Change History (4)

comment:1 by Ion Gaztañaga, 8 years ago

Resolution: fixed
Status: newclosed

This seems fixed in current develop and master branches. Thanks for the report.

comment:2 by mark.incley@…, 8 years ago

Resolution: fixed
Status: closedreopened
Version: Boost 1.54.0Boost 1.57.0

Hi,

I'm still seeing this occur with deques in Boost 1.57 under Visual Studio 2012: 2>c:\thirdpartysdk\boost_1_57_0\boost\container\deque.hpp(401): error C4703: potentially uninitialized local pointer variable 'cur' used

This is particularly pesky because Visual Studio 2012 treats this as an error when built with the /sdl compiler option.

Thanks Mark.

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

Resolution: fixed
Status: reopenedclosed

I'm still not seeing the warning in the develop branch when compiling with MSVC12, I, but I've committed a change initializing variables before BOOST_TRY:

[develop 37db43b] Try to fix MSVC12 warnings of uninitialized variables when using no exception macros.

Let me know if this fixes the warning.

comment:4 by anonymous, 8 years ago

Hi,

I can confirm the warning has now gone with Boost 1.58 Beta 1.

Thanks for the fix. Mark.

Note: See TracTickets for help on using tickets.