Opened 15 years ago

Closed 14 years ago

Last modified 11 years ago

#1748 closed Bugs (fixed)

[ptr_container] compiler warnings from VC9

Reported by: Richard Webb <richard.webb@…> Owned by: Thorsten Ottosen
Milestone: To Be Determined Component: ptr_container
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc:

Description

running the ptr_container tests on VC9 with warning level 4 produces quite a few warnings:

boost/ptr_container/ptr_array.hpp(39) : warning C4100: 'a' : unreferenced formal parameter

boost/ptr_container/detail/serialize_reversible_cont.hpp(69) : warning C4100: 'version' : unreferenced formal parameter

boost/ptr_container/detail/serialize_ptr_map_adapter.hpp(20) : warning C4100: 'version' : unreferenced formal parameter
boost/ptr_container/detail/serialize_ptr_map_adapter.hpp(38) : warning C4100: 'version' : unreferenced formal parameter
boost/ptr_container/detail/serialize_ptr_map_adapter.hpp(61) : warning C4100: 'version' : unreferenced formal parameter

boost/ptr_container/serialize_ptr_vector.hpp(19) : warning C4100: 'version' : unreferenced formal parameter

boost/ptr_container/serialize_ptr_array.hpp(19) : warning C4100: 'version' : unreferenced formal parameter
boost/ptr_container/serialize_ptr_array.hpp(25) : warning C4100: 'version' : unreferenced formal parameter

boost/ptr_container/clone_allocator.hpp(77) : warning C4100: 'r' : unreferenced formal parameter

boost/ptr_container/ptr_map_adapter.hpp(134) : warning C4127: conditional expression is constant

boost/ptr_container/detail/map_iterator.hpp(50) : warning C4512: 'boost::ptr_container_detail::ref_pair<F,S>' : assignment operator could not be generated
boost/ptr_container/ptr_map_adapter.hpp(156) : warning C4512: 'boost::ptr_container_detail::ptr_map_adapter_base<T,VoidPtrMap,CloneAllocator>::eraser' : assignment operator could not be generated

The attached patch silences the 4100/4512 warnings for me.

Attachments (2)

ptr_container.patch (6.3 KB ) - added by Richard Webb <richard.webb@…> 15 years ago.
ptr_container_src.patch (1.8 KB ) - added by Richard Webb <richard.webb@…> 15 years ago.

Download all attachments as: .zip

Change History (5)

by Richard Webb <richard.webb@…>, 15 years ago

Attachment: ptr_container.patch added

comment:1 by Richard Webb <richard.webb@…>, 15 years ago

Theres also a few warnings from the tests themselves.

serialization.cpp(98) : warning C4100: 'n' : unreferenced formal parameter
serialization.cpp(76) : warning C4100: 'version' : unreferenced formal parameter

serialization.cpp(51) : warning C4100: 'version' : unreferenced formal parameter

libs\ptr_container\test\test_data.hpp(243) : warning C4100: 'r' : unreferenced formal parameter
libs\ptr_container\test\test_data.hpp(70) : warning C4100: 'b' : unreferenced formal parameter
libs\ptr_container\test\test_data.hpp(95) : warning C4100: 'out' : unreferenced formal parameter

Seperate patch attached.

by Richard Webb <richard.webb@…>, 15 years ago

Attachment: ptr_container_src.patch added

comment:2 by Thorsten Ottosen, 14 years ago

Resolution: fixed
Status: newclosed

Applied.

Thanks

-Thorsten

comment:3 by asdasd, 11 years ago

Warning

boost/ptr_container/detail/map_iterator.hpp(50) : warning C4512: 'boost::ptr_container_detail::ref_pair<F,S>' : assignment operator could not be generated

is still available. I tried to add no-compilable method operator= to ref_pair structure and it does work.

Note: See TracTickets for help on using tickets.