Compiling Crypto++ 5.6.0 On Microsoft Visual C++ (MSVC) 2005 With Level 4 Warnings (W4) Produces Many Warnings

View: New views
2 Messages — Rating Filter:   Alert me  

Compiling Crypto++ 5.6.0 On Microsoft Visual C++ (MSVC) 2005 With Level 4 Warnings (W4) Produces Many Warnings

by Tim-444 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I often read that compiling with all warnings switched on is good
practice and that treating any produced warnings as errors that must
be fixed is also good practice. It compiles fine with level 3 warnings
btw.

Is there a plan to make it compile under W4 without warnings?
If not is there a reason? Are MSVC W4 warnings considered OTT?

Thanks in advance,

Tim.

P.S. Thanks for the library - it saves me a lot of time.
P.P.S I am using Visual Studio c++ Express 2005.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---


Re: Compiling Crypto++ 5.6.0 On Microsoft Visual C++ (MSVC) 2005 With Level 4 Warnings (W4) Produces Many Warnings

by Jeffrey Walton-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Tim,

>  I often read that compiling with all warnings switched on is good
>  practice and that treating any produced warnings as errors that must
>  be fixed is also good practice.
Yes. See, for example, Debugging Applications for Windows )Robbins) or
Writing Secure Code (Howard and LeBlanc).

In this case, it is OK to leave the *library* at Level 3 (Crypto++
Level 4 complaints have been addressed). In your source code, use the
library as follows. Note that Windows and STL headers do not clean
compile at Level 4 either.

#pragma warning( push, 3 )
#  include <windows.h>
#  include <string>
#  include <osrng.h>
#  include <aes.h>
#pragma warning( pop )

// Your Level 4 headers follow

Jeff

On 6/8/09, Tim <tim@...> wrote:

>
>  I often read that compiling with all warnings switched on is good
>  practice and that treating any produced warnings as errors that must
>  be fixed is also good practice. It compiles fine with level 3 warnings
>  btw.
>
>  Is there a plan to make it compile under W4 without warnings?
>  If not is there a reason? Are MSVC W4 warnings considered OTT?
>
>  Thanks in advance,
>
>  Tim.
>
>  P.S. Thanks for the library - it saves me a lot of time.
>  P.P.S I am using Visual Studio c++ Express 2005.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---