The macros used to weave in the case statements are not working. The gcc
compiler is not expanding the macros. Here is the patch I used to clear
the warnings. Its not a fix which that should be evident. What I can
send upon request is the preprocessor output. The file I have is 60K in
size and I am not sure if the maillist server will allow that as an
attachment. I certainly do not want to inline it.

Index: basecode.cpp
===================================================================
RCS file: /cvsroot/cryptopp/c5/basecode.cpp,v
retrieving revision 1.8
diff -U2 -r1.8 basecode.cpp
--- basecode.cpp        18 Jul 2003 04:35:30 -0000      1.8
+++ basecode.cpp        3 Nov 2003 05:41:02 -0000
@@ -79,6 +79,13 @@
                                m_outBuf[i] = m_alphabet[m_outBuf[i]];
                        }
-                       FILTER_OUTPUT(1, m_outBuf, m_outputBlockSize, 0);
+                       /* FIXME: statement has no effect
+                          
+                       QUESTION: are you trying to weave in the switch 
+                       statement elements here? I don't see the advantage
+                       of these macros.
                        
+                       FILTER_OUTPUT(1, m_outBuf, m_outputBlockSize, 0);
+                       */
+
                        m_bytePos = m_bitPos = 0;
                }
@@ -98,5 +105,13 @@
                        m_bytePos = m_outputBlockSize;
                }
+
+               /* FIXME: statement has no effect
+                  
+               QUESTION: are you trying to weave in the switch 
+               statement elements here? I don't see the advantage
+               of these macros.
+               
                FILTER_OUTPUT(2, m_outBuf, m_bytePos, messageEnd);
+               */
                m_bytePos = m_bitPos = 0;
        }
@@ -155,5 +170,12 @@
                if (m_bytePos == m_outputBlockSize)
                {
+                       /* FIXME: statement has no effect
+                          
+                       QUESTION: are you trying to weave in the switch 
+                       statement elements here? I don't see the advantage
+                       of these macros.
+                       
                        FILTER_OUTPUT(1, m_outBuf, m_outputBlockSize, 0);
+                       */
                        m_bytePos = m_bitPos = 0;
                }
@@ -161,6 +183,13 @@
        if (messageEnd)
        {
-               FILTER_OUTPUT(2, m_outBuf, m_bytePos, messageEnd);
-               m_bytePos = m_bitPos = 0;
+         /* FIXME: statement has no effect
+            
+         QUESTION: are you trying to weave in the switch 
+         statement elements here? I don't see the advantage
+         of these macros.
+         
+         FILTER_OUTPUT(2, m_outBuf, m_bytePos, messageEnd);
+         */
+         m_bytePos = m_bitPos = 0;
        }
        FILTER_END_NO_MESSAGE_END;
@@ -211,22 +240,52 @@
                {
                        if (m_counter == m_groupSize)
-                       {
-                               FILTER_OUTPUT(1, m_separator, m_separator.size(), 0);
-                               m_counter = 0;
+                         {
+                           /* FIXME: statement has no effect
+                              
+                           QUESTION: are you trying to weave in the switch 
+                           statement elements here? I don't see the advantage
+                           of these macros.
+                           
+                           FILTER_OUTPUT(1, m_separator, m_separator.size(), 0);
+                           */
+                           m_counter = 0;
                        }
 
-                       unsigned int len;
+                       unsigned int len = STDMIN(length - m_inputPosition,
+                                                 m_groupSize - m_counter);
+                       /* FIXME: statement has no effect
+                          
+                       QUESTION: are you trying to weave in the switch 
+                       statement elements here? I don't see the advantage
+                       of these macros.
+                       
                        FILTER_OUTPUT2(2, len = STDMIN(length-m_inputPosition,
m_groupSize-m_counter),
                                begin+m_inputPosition, len, 0);
+                       */
                        m_inputPosition += len;
                        m_counter += len;
                }
        }
+
+       /* FIXME: statement has no effect
+          
+       QUESTION: are you trying to weave in the switch 
+       statement elements here? I don't see the advantage
+       of these macros.
+       
        else
                FILTER_OUTPUT(3, begin, length, 0);
+       */
 
        if (messageEnd)
        {
-               FILTER_OUTPUT(4, m_terminator, m_terminator.size(), messageEnd);
+         /* FIXME: statement has no effect
+            
+         QUESTION: are you trying to weave in the switch 
+         statement elements here? I don't see the advantage
+         of these macros.
+         
+         FILTER_OUTPUT(4, m_terminator, m_terminator.size(), messageEnd);
+         */
                m_counter = 0;
        }

Stephen
-- 
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