Browse Source

Minor tweaks to FilterChain.* to eliminate compiler warnings.

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@5 dc71a809-1921-45c4-985c-09c81d0142d9
wx
madscientist 15 years ago
parent
commit
c4d8b3fcaa
2 changed files with 18 additions and 16 deletions
  1. 1
    1
      FilterChain.cpp
  2. 17
    15
      FilterChain.hpp

+ 1
- 1
FilterChain.cpp View File

@@ -759,7 +759,7 @@ unsigned char FilterChainDefunker::DecodeNum() { // If our mode is Dec
unsigned char NumBfr[5]; // A buffer for digits.
memset(NumBfr,0,sizeof(NumBfr)); // Clear the buffer.
for( // Let's read the number...
int i=0; // NumBfr position = 0;
unsigned int i=0; // NumBfr position = 0;
i<(sizeof(NumBfr)-1) && // Stay well within the NunBfr.
(EnQueue(NumBfr[i]=GetStore()), // Read and EnQueue each byte.
isdigit(NumBfr[i])); // Keep going if it's a digit.

+ 17
- 15
FilterChain.hpp View File

@@ -102,7 +102,9 @@ class FilterChain {
FilterChain(FilterChain* S) {
if(NULL==S) throw BadSource("FilterChain: NULL source not valid");
else Source = S;
}
}
virtual ~FilterChain() {} // Stop Warns about no virt dtor
};

// FilterChainInput
@@ -217,8 +219,8 @@ class FilterChainCBFR : public FilterChain {
private:

unsigned char* InputBuffer;
int BufferIndex;
int BufferLength;
unsigned int BufferLength;
unsigned int BufferIndex;

stringstream& PrependedHeaders;

@@ -348,8 +350,8 @@ class FilterChainBase64 : public FilterChain {
DECODING // Delivering filtered data.
} State;

int ScanIx; // Scanning Index.
int DequeIx; // Dequeing Index.
unsigned int ScanIx; // Scanning Index.
unsigned int DequeIx; // Dequeing Index.
unsigned char Buffer; // Define a buffer.

bool ValidByte(unsigned char y); // True if y can be decoded.
@@ -557,13 +559,13 @@ class FilterChainDefunker : public FilterChain { // Class definiti

FilterChainDefunker(FilterChain* S) // Sourced constructor...
:FilterChain(S), // Call the base constructor.
InputPosition(0), // Reset both position pointers.
OutputPosition(0),
LastRawByte(0),
LastReadOut(0),
LastGetStore(0),
Master(&FilterChainDefunker::SkipHeaders), // Set the initial external and
Internal(&FilterChainDefunker::Preamble), // internal states.
InputPosition(0), // Reset both position pointers.
OutputPosition(0),
LastReadOut(0),
LastGetStore(0),
LastRawByte(0) {
Internal(&FilterChainDefunker::Preamble) { // internal states.

ClearQueue(); // Clear the queue;

@@ -594,8 +596,8 @@ class FilterChainUrlDecode : public FilterChain {
private:

unsigned char DecodeBfr[UrlDecodeBfrSize]; // Decoded anchor buffer.
int DecodeLength; // Decoded anchor length.
int DecodePosition; // Read (Inject) Position.
unsigned int DecodeLength; // Decoded anchor length.
unsigned int DecodePosition; // Read (Inject) Position.
bool DecodeFlag; // True if the URL was decoded.

void Clear() { // Function to clear the bfr.
@@ -742,6 +744,7 @@ class FilterChainHeaderAnalysis : public FilterChain {

FilterChainHeaderAnalysis(FilterChain* S, FilterChainIPTester& T) : // Construct with the chain and a tester.
FilterChain(S), // Capture the chain.
Mode(&FilterChainHeaderAnalysis::doSeekDispatch), // Start in SeekDispatch() mode
IPTester(T), // Capture the tester.
IPToTest(""), // IPToTest and
IPTestResult(""), // IPTestResult are both empty to start.
@@ -751,8 +754,7 @@ class FilterChainHeaderAnalysis : public FilterChain {
FoundMessageID(false),
FoundDate(false),
FoundSubject(false),
FoundHighBitCharacters(false),
Mode(&FilterChainHeaderAnalysis::doSeekDispatch) { // Start in SeekDispatch() mode
FoundHighBitCharacters(false) {
} // -- first byte of a new line ;-)

bool MissingFrom() { return (!FoundFrom); } // True if missing From header.

Loading…
Cancel
Save