The assert statement is reported as being unused. This was test both with the compiler flags set to '-g' and '-O2'.
Stephen
Index: algparam.h
===================================================================
RCS file: /cvsroot/cryptopp/c5/algparam.h,v
retrieving revision 1.6
diff -U2 -r1.6 algparam.h
--- algparam.h 18 Jul 2003 04:35:30 -0000 1.6
+++ algparam.h 3 Nov 2003 05:21:05 -0000
@@ -24,6 +24,14 @@
template <class T> ConstByteArrayParameter(const T &string, bool
deepCopy = false)
{
- CRYPTOPP_COMPILE_ASSERT(sizeof(string[0])==1);
- Assign((const byte *)string.data(), string.size(), deepCopy);
+ /* FIXME: Unused -
+ CRYPTOPP_COMPILE_ASSERT(sizeof(string[0])==1);
+
+ SUGGESTION: Consider throwing an exception here to allow the
+ program to exit gracefully and be more informative. Without
+ an exception a programmer needs to use a stack trace via a
+ core dump to figure out why crypto++ or their application
+ caused this condition to be true
+ */
+ Assign((const byte *)string.data(), string.size(), deepCopy);
}
@@ -279,7 +287,8 @@
virtual const NameValuePairs & GetParent() const =0;
+ const char *m_name;
bool m_throwIfNotUsed;
mutable bool m_used;
- const char *m_name;
+
};
--
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc
signature.asc
Description: This is a digitally signed message part
