Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#8032 closed Patches (fixed)

Warning fixes in circular_buffer

Reported by: Franz Detro <franz.detro@…> Owned by: Marshall Clow
Milestone: To Be Determined Component: circular_buffer
Version: Boost 1.53.0 Severity: Cosmetic
Keywords: Cc:

Description

We have a zero warning policy in our development projects and experience lots of warnings in several boost libraries. With every new boost version we need to apply a set of warning fixes.

It would help a lot if you could integrate these wanting fixes into future boost releases.

Please find attached a patch file against boost 1.53.0 which fixes several warnings in circular_buffer.

Attachments (1)

circular_buffer.diff (2.0 KB ) - added by Franz Detro <franz.detro@…> 10 years ago.

Download all attachments as: .zip

Change History (8)

by Franz Detro <franz.detro@…>, 10 years ago

Attachment: circular_buffer.diff added

comment:1 by Marshall Clow, 9 years ago

Owner: changed from Jan Gaspar to Marshall Clow
Status: newassigned

comment:2 by Marshall Clow, 9 years ago

Applied patch in [84405]

comment:3 by Marshall Clow, 9 years ago

Resolution: fixed
Status: assignedclosed

(In [84450]) Apply patch to release branch; Fixes #8032

comment:4 by pbf@…, 9 years ago

When building against boost 1.55 using VisualStudio 2010 with warning level 4, I now see:

1>C:\src\svn\OTI\ThirdParty\boost_1_55_0_OT1\include\boost/circular_buffer/base.hpp(199): warning C4172: returning address of local variable or temporary

Likewise, building using gcc 4.4.7 on RedHat produces the following warning:

/media/sf_C_DRIVE/src/svn/OTI/ThirdParty/boost_1_55_0_OT1/include/boost/circular_buffer/base.hpp:2157: error: suggest parentheses around ‘&&’ within ‘

The MSVC issue seems to be a regression introduced by the adoption of move semantics (ticket #7888), so I'll make the same comment there. I'm guessing it's the same case for the gcc warning, although the warning itself doesn't make much sense to me, given the line in question is:

replace(p, this_type::move_if_noexcept(*next));

comment:5 by pbf@…, 9 years ago

Just to follow up, Antony has kindly said he'll fix the warnings as part of #7888, so hopefully circular_buffer will be warning free once again.

comment:6 by michael.broida@…, 8 years ago

We have hit the same warnings in 1.55.0 with VS2010 and all warnings treated as errors. This issue shows "fixed", but where/when was it fixed? #7888 shows "reopened", but that was six months ago and no more info.

comment:7 by Matthäus Brandl <brandl.matthaeus@…>, 8 years ago

Using Boost 1.56.0 warning C4172 is still reported by VS2010.

Note: See TracTickets for help on using tickets.