Opened 13 years ago

Closed 9 years ago

#4018 closed Patches (fixed)

[PATCH] boost/multi_index gcc warning cleanup

Reported by: Tatu Kilappa <tatu.kilappa@…> Owned by: Joaquín M López Muñoz
Milestone: Boost 1.43.0 Component: multi_index
Version: Boost Development Trunk Severity: Cosmetic
Keywords: gcc warning Cc:

Description

Patch to clean up excessive gcc 4.x warning barf.

To reproduce, compile any program using property_tree (that by proxy uses multi_index) with: -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Werror=return-type -Wextra -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wno-multichar -Wpacked -Wredundant-decls -Wshadow -Wswitch-default -Wundef -Wwrite-strings -Wctor-dtor-privacy -Werror=non-virtual-dtor -Woverloaded-virtual

Attached patch fixes the issues, except for boost/multi_index_container.hpp, which produces the following:

/usr/local/include/boost/multi_index_container.hpp: In member function 'typename boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>::nth_index_iterator<N>::type boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>::project(IteratorType)':

/usr/local/include/boost/multi_index_container.hpp:363: warning: declaration of 'index' shadows a member of 'this'

As index is not referenced within the four instances of this warning, I refrained from modifying them. If you can fix the issue, I would appreciate it.

Attachments (2)

boost_multi_index_gcc_warning_cleanup.diff (4.6 KB ) - added by Tatu Kilappa <tatu.kilappa@…> 13 years ago.
boost_multi_index_gcc_warning_cleanup.2.diff (7.3 KB ) - added by tatu.kilappa@… 12 years ago.
Updated patch file for current trunk, also fixes earlier dangling typedef issue.

Download all attachments as: .zip

Change History (5)

by Tatu Kilappa <tatu.kilappa@…>, 13 years ago

comment:1 by Joaquín M López Muñoz, 13 years ago

Status: newassigned

I'm in the middle of refactoring some internal parts of the lib, once I'm done with that I'll address this. Thanks for reporting.

by tatu.kilappa@…, 12 years ago

Updated patch file for current trunk, also fixes earlier dangling typedef issue.

comment:2 by tatu.kilappa@…, 12 years ago

I updated the patch to match current trunk. Also took care of the typedef warning.

The old patch file is now useless.

comment:3 by Joaquín M López Muñoz, 9 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.