I do not accept patches to fix gcc compiler warnings (unless the warnings
indicate real bugs). This is because gcc lacks a way to disable specific
(useless) warnings, and because it's not my development compiler. Trying to
remove all warnings while porting Crypto++ to other compilers is just too
much of a maintenance headache.
I do realize this could be a problem when including Crypto++ headers into a
project that compiles with -Wall. Perhaps someone knows a way in gcc to
disable warnings for a particular set of headers?
----- Original Message -----
From: "Andrew Walrond" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, September 19, 2005 5:05 PM
Subject: Fix for gcc compiler warning
When including the Cryptoheaders into a project which compiles with
the gcc warning option -Wall, there are quite a few warning messages.
I have lots of these small fixes against cvs HEAD, but since nobody
seems predisposed to answer my messages to this list (Boo hoo),
I'll start by sending just one example. If it is useful, I am happy to
send more patches in whatever format suits.
Here is an example:
cryptopp/modarith.h:30: warning: base class `class
CryptoPP::AbstractRing<CryptoPP::Integer>' should be explicitly
initialized in the copy constructor
With the fix:
iff -r 70ecf16ec9dd modarith.h
--- a/modarith.h Sun Sep 11 14:31:52 2005
+++ b/modarith.h Mon Sep 19 10:00:19 2005
@@ -27,7 +27,8 @@
: m_modulus(modulus), m_result((word)0, modulus.reg.size())
{}
ModularArithmetic(const ModularArithmetic &ma)
- : m_modulus(ma.m_modulus), m_result((word)0,
m_modulus.reg.size()) {}
+ : AbstractRing<Integer>(ma),
+ m_modulus(ma.m_modulus), m_result((word)0,
m_modulus.reg.size()) {}
ModularArithmetic(BufferedTransformation &bt); // construct from
BER encoded parameters
Hope thats useful.
Andrew Walrond