Well, it looks like you have a few choices:

1) Do nothing

2) Wrap ACE_UNUSED_ARG(...) around each of the 180 warnings

3) Edit your collection of source files, adding the #pragma

hmm.. that would mean i would need to put those pragma's in every .cpp
file i have no?
Considering you have 180 warnings, and probably 10 or fewer source
files per project, I would probably go with 3.

Jeff


On 12/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
hmm.. that would mean i would need to put those pragma's in every .cpp
file i have no?

here is what the ACE Framework uses:

http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ace/config-macros.h

look at ACE_UNUSED_ARG macro

so the previous example would be done like this:

bool GetVoidValue(const char *name, const std::type_info &valueType,
void *pValue)
{
ACE_UNUSED_ARG(name) ;
ACE_UNUSED_ARG(valueType) ;
ACE_UNUSED_ARG(pValue) ;
return false;
}




On 12/29/06, Jeffrey Walton <[EMAIL PROTECTED]> wrote:
> Hi Anthony,
>
> Another way around it (this is what I use with STL):
> Set you _Project_ Warning Level to 3. Then, add a pragma to crank it up a bit:
>
> #include "StdAfx.h"
> ...
> #include "MD5.h"
>
> #pragma warning( push, 4 )
> int main( ... )
> {
>    ...
> }
> #pragma warning( pop )
>
> Jeff
>
> On 12/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Im getting lots of  "unreferenced formal parameters" warnings using
> > version 5.4 and visual studio 2005.
> >
> > these are easy to get rid of by changing the function implementation to
> > not name the parameter...
> >
> > change something like:
> >
> >        bool GetVoidValue(const char *name, const std::type_info &valueType,
> > void *pValue) const {return false;}
> >
> > to:
> >        bool GetVoidValue(const char *const std::type_info &void *const
> > {return false;}
> >
> > I know this works for Visual Studio, not sure about other compilers.
> > You could also wrap the parameters in the function with a macro that
> > expands to something that will be optimized away.  I know ive seen
> > other third party libraries do this.
> >
> > This is a pretty minor issue, but when i see 180+ warnings (im using
> > warning level 4), its hard to sort out warnings from my code, and
> > warnings from third party stuff
> >
> >
> > -Anthony
> >
> >
> > > > >
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Crypto++ 
Users" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cryptopp-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to