Sfoglia il codice sorgente

Update to address g++ warnings.

adeniz_1
Alban Deniz 1 anno fa
parent
commit
7542a486f6
5 ha cambiato i file con 11 aggiunte e 8 eliminazioni
  1. 3
    3
      FilterChain.cpp
  2. 1
    1
      GBUdb.cpp
  3. 3
    2
      snfLOGmgr.cpp
  4. 3
    1
      snfNETmgr.cpp
  5. 1
    1
      snf_sync.cpp

+ 3
- 3
FilterChain.cpp Vedi File

@@ -49,7 +49,7 @@ unsigned char FilterChainBase64::GetByte() {
x=FilterChain::GetByte(); // Get the next byte from source.
} // If we get the empty signal
// here, we've failed to match.
catch(Empty) { // If so - and we haven't
catch(const Empty&) { // If so - and we haven't
if(0==ScanIx) throw Empty("FilterChainBase64: No more data"); // started then just throw Empty.
State=DEQUEING;DequeIx=0; // If we have then we'll dequeue
return GetByte(); // it and throw when that's done
@@ -494,7 +494,7 @@ unsigned char FilterChainDefunker::Store() { // While in Store mod
StoreBuffer[InputPosition++] = x; // and storing it.
}

catch(Empty) { // When we get the Empty
catch(const Empty&) { // When we get the Empty
Master = &FilterChainDefunker::ReadOut; // signal it is time for us
return GetByte(); // to read out our data.
}
@@ -1295,7 +1295,7 @@ unsigned char FilterChainHeaderAnalysis::doEndOfHeaders() {
return GetByte(); // Return the first byte from there :-)
}

void FilterChainHeaderAnalysis::SetOutputBuffer(string& s) { // Setup the OutputBuffer.
void FilterChainHeaderAnalysis::SetOutputBuffer(std::string& s) { // Setup the OutputBuffer.
OutputBuffer = (char*) s.c_str(); OutputIndex = 0; // Capture the c_str and reset the index.
}


+ 1
- 1
GBUdb.cpp Vedi File

@@ -517,7 +517,7 @@ char* getTimestamp(char* TimestampBfr) {
time(&rawtime); // Grab the current time and
gmt=gmtime(&rawtime); // convert it to GMT.

sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
(void) snprintf(TimestampBfr,UTCBufferSize, "%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
gmt->tm_year+1900,
gmt->tm_mon+1,
gmt->tm_mday,

+ 3
- 2
snfLOGmgr.cpp Vedi File

@@ -213,7 +213,7 @@ Timer& IntervalTimer::Inactive() {

msclock IntervalTimer::hack() { // Chop off a new interval & return it.
Inactive().start(Active().stop()); // Stop the active clock and reference
ANotB = ~ANotB; // it to start the new Active clock.
ANotB = !ANotB; // it to start the new Active clock.
return Interval(); // Flip the bit and return the Interval.
}

@@ -1772,7 +1772,8 @@ string snfLOGmgr::LocalTimestamp(time_t t) {
char TimestampBfr[20]; // Create a small buffer.
tm* localt; // Get a ptr to a tm structure.
localt = localtime(&t); // Fill it with local time.
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
snprintf(TimestampBfr, sizeof(TimestampBfr),
"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
localt->tm_year+1900,
localt->tm_mon+1,
localt->tm_mday,

+ 3
- 1
snfNETmgr.cpp Vedi File

@@ -260,7 +260,9 @@ string& snfNETmgr::RulebaseUTC(string& t) {

char TimestampBfr[20]; // Timestamp buffer.

sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss
(void) snprintf( // Format yyyymmddhhmmss
TimestampBfr, sizeof(TimestampBfr),
"%04d%02d%02d%02d%02d%02d",
RulebaseTime.tm_year+1900,
RulebaseTime.tm_mon+1,
RulebaseTime.tm_mday,

+ 1
- 1
snf_sync.cpp Vedi File

@@ -119,7 +119,7 @@ void GBUAlertHandler::operator()(
NewAlert.IP = IPAddress.getAddress(); // Put the IP into it's place.
NewAlert.R.Bad(Alert_b); // Set the bad count on the record.
NewAlert.R.Good(Alert_g); // Set the good count on the record.
strncpy(NewAlert.UTC, Alert_time.c_str(), UTCBufferSize); // Copy the timestamp.
strncpy(NewAlert.UTC, Alert_time.c_str(), UTCBufferSize-1); // Copy the timestamp.
switch(Alert_t.at(0)) { // Use the first byte to set the flag.
case 'U': { // U means Ugly.
NewAlert.R.Flag(Ugly);

Loading…
Annulla
Salva