Opened 12 years ago

Closed 11 years ago

#5466 closed Support Requests (wontfix)

Warning from serialization.hpp

Reported by: Paul A. Bristow Owned by: Robert Ramey
Milestone: Boost 1.47.0 Component: serialization
Version: Boost 1.47.0 Severity: Cosmetic
Keywords: Cc:

Description

#if defined(_MSC_VER) && (_MSC_VER >= 1310) # pragma warning (disable : 4675) suppress ADL warning. # pragma warning(disable : 4100) unreferenced formal parameter. #endif

To suppress ugly warnings on MSVC, I'd like to add

# pragma warning(disable : 4100) unreferenced formal parameter.

as above.

Thanks.

OK to commit to trunk?

Change History (4)

comment:1 by anonymous, 12 years ago

Not a good idea.

Better would be to tweak the code so the warning doesn't appear. ie chane

void f(int x){ }

to

void f(int /*x*/){ }

Robert Ramey

comment:2 by Paul A. Bristow, 12 years ago

Yes indeed it might be better, but I wouldn't presume to touch your code!

MS are unreasonable to moan about this - your code is quite correct.

And it may be tricky to find all the places which may trigger this warning.

But either way, many may be grateful not to have pages of warnings.

Tell me if there is anything I can do to help.

comment:3 by Robert Ramey, 12 years ago

Hmmm - Build with MSVC level 4 and I get very few if any warnings.

When does this occur? When you build the library? or when you build a user program which uses the library. I invested a lot of effort to get the code as warning free as possible so I'm curious about this.

Send me your error listing for this.

Robert Ramey

PS. There is an easy fix for your own system. Use the IDE to include a command line switch to supress this specific warning.

RR.

comment:4 by anonymous, 11 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.