Opened 15 years ago

Closed 14 years ago

#1747 closed Bugs (fixed)

[serialization] unreferenced formal parameter warnings from VC9

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

Description

Running the serialization tests on VC9 (visual studio 2008) with warning level 4 results in large numbers of C4100 "unreferenced formal parameter" warnings:

boost/serialization/extended_type_info.hpp(45) : warning C4100: 'rhs' : unreferenced formal parameter
boost/serialization/extended_type_info.hpp(50) : warning C4100: 'rhs' : unreferenced formal parameter
boost/serialization/extended_type_info.hpp(78) : warning C4100: 'count' : unreferenced formal parameter
boost/serialization/extended_type_info.hpp(82) : warning C4100: 'p' : unreferenced formal parameter

boost/serialization/deque.hpp(46) : warning C4100: 'file_version' : unreferenced formal parameter
boost/serialization/export.hpp(118) : warning C4100: 'key' : unreferenced formal parameter
boost/serialization/valarray.hpp(40) : warning C4100: 'file_version' : unreferenced formal parameter

boost/serialization/variant.hpp(67) : warning C4100: 'version' : unreferenced formal parameter
boost/serialization/variant.hpp(85) : warning C4100: 'version' : unreferenced formal parameter
boost/serialization/variant.hpp(83) : warning C4100: 'v' : unreferenced formal parameter
boost/serialization/variant.hpp(82) : warning C4100: 'which' : unreferenced formal parameter
boost/serialization/variant.hpp(81) : warning C4100: 'ar' : unreferenced formal parameter

boost/archive/array/iarchive.hpp(69) : warning C4100: 'version' : unreferenced formal parameter

boost/archive/detail/common_oarchive.hpp(66) : warning C4100: 'name' : unreferenced formal parameter
boost/archive/detail/common_oarchive.hpp(67) : warning C4100: 'name' : unreferenced formal parameter
boost/archive/detail/common_iarchive.hpp(63) : warning C4100: 'name' : unreferenced formal parameter
boost/archive/detail/common_iarchive.hpp(64) : warning C4100: 'name' : unreferenced formal parameter

//
libs\serialization\src\codecvt_null.cpp(22) : warning C4100: 'state' : unreferenced formal parameter
libs\serialization\src\codecvt_null.cpp(50) : warning C4100: 'state' : unreferenced formal parameter

and a few 4512 "assignment operator could not be generated" as well:

boost/serialization/array.hpp(56) : warning C4512: 'boost::serialization::array<T>' : assignment operator could not be generated
boost/archive/basic_streambuf_locale_saver.hpp(54) : warning C4512: 'boost::archive::basic_streambuf_locale_saver<Ch,Tr>' : assignment operator could not be generated
boost/serialization/binary_object.hpp(59) : warning C4512: 'boost::serialization::binary_object' : assignment operator could not be generated

The attached patches clean up most of these for me.

Attachments (3)

serial.diff (4.7 KB ) - added by Richard Webb <richard.webb@…> 15 years ago.
archive.patch (2.2 KB ) - added by Richard Webb <richard.webb@…> 15 years ago.
serial_src.patch (663 bytes ) - 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: serial.diff added

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

Attachment: archive.patch added

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

Attachment: serial_src.patch added

comment:1 by Robert Ramey, 15 years ago

Status: newassigned

Nice job. I'll roll in these changes when I get the time.

Robert Ramey

comment:2 by Robert Ramey, 14 years ago

Resolution: fixed
Status: assignedclosed

I rolled in thes changes.

I didn't do the ones related the the assigments. I don't think I want to declare a function that is never called (or can't be called). I'm not sure what the warning means.

Robert Ramey

Note: See TracTickets for help on using tickets.