The first patch clears up a warning about comparison between unsigned
int and int. The second clears a warning about comparison of promoted
~unsigned with unsigned. In regards to this second warning I traced back
to the header for m_storedLen. Its already a word16. Is there a reason
for casting it? For education what does the '~' mean in front of the
variable?

Stephen

bash-2.05b$ cvs diff zinflate.cpp
Index: zinflate.cpp
===================================================================
RCS file: /cvsroot/cryptopp/c5/zinflate.cpp,v
retrieving revision 1.6
diff -U2 -r1.6 zinflate.cpp
--- zinflate.cpp        29 Jul 2003 01:18:33 -0000      1.6
+++ zinflate.cpp        7 Nov 2003 04:57:46 -0000
@@ -136,5 +136,5 @@
        assert(m_normalizedCacheMask == BitReverse(m_cacheMask));

-       if (m_cache.size() != 1 << m_cacheBits)
+       if (m_cache.size() != ( (unsigned int) 1 << m_cacheBits) )
                m_cache.resize(1 << m_cacheBits);

@@ -361,5 +361,5 @@
                m_storedLen = (word16)m_reader.GetBits(16);
                word16 nlen = (word16)m_reader.GetBits(16);
-               if (nlen != (word16)~m_storedLen)
+               if (nlen != m_storedLen)
                        throw BadBlockErr();
                break;

-- 
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc
-- 
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to