Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#8032 closed Patches (fixed)

Warning fixes in circular_buffer

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


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@…> 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by Franz Detro <franz.detro@…>

comment:1 Changed 4 years ago by marshall

  • Owner changed from jano_gaspar to marshall
  • Status changed from new to assigned

comment:2 Changed 4 years ago by marshall

Applied patch in [84405]

comment:3 Changed 4 years ago by marshall

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

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

comment:4 Changed 4 years ago by pbf@…

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 Changed 4 years ago by pbf@…

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 Changed 3 years ago by michael.broida@…

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 Changed 3 years ago by Matthäus Brandl <brandl.matthaeus@…>

Using Boost 1.56.0 warning C4172 is still reported by VS2010.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain marshall.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.