Author: Fish
Date: Fri Jul 1 17:07:23 2005
New Revision: 43
Modified:
trunk/configure
trunk/configure.in
trunk/floodserv.c
Log:
fix GCC 4.0 warnings
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri Jul 1 17:07:23 2005
@@ -1279,7 +1279,8 @@
DIRINST=~/NeoStats3.0/
-CFLAGS="$CFLAGS -O2"
+CFLAGS="$CFLAGS -O2 -fno-strict-aliasing"
+
case "$host_os" in
*openbsd*)
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Jul 1 17:07:23 2005
@@ -13,7 +13,8 @@
AC_DEFINE_UNQUOTED(MODULE_REV, "$MODULE_REV")
DIRINST=~/NeoStats3.0/
AC_PREFIX_DEFAULT(~/NeoStats3.0/)
-CFLAGS="$CFLAGS -O2"
+CFLAGS="$CFLAGS -O2 -fno-strict-aliasing"
+
case "$host_os" in
*openbsd*)
Modified: trunk/floodserv.c
==============================================================================
--- trunk/floodserv.c (original)
+++ trunk/floodserv.c Fri Jul 1 17:07:23 2005
@@ -270,15 +270,15 @@
{
case 0:
/* warn only */
- nlog( LOG_WARNING, "Warning, possible flood on %s. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, period, fscfg.joinsampletime );
- irc_chanalert( fs_bot, "Warning, possible flood on %s. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, period, fscfg.joinsampletime );
- irc_globops( fs_bot, "Warning, possible flood on %s. AJPP: %d/%d Sec, SampleTime %d", ci->c->name, ci->ajpp, period, fscfg.joinsampletime );
+ nlog( LOG_WARNING, "Warning, possible flood on %s. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, (int)period, fscfg.joinsampletime );
+ irc_chanalert( fs_bot, "Warning, possible flood on %s. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, (int)period, fscfg.joinsampletime );
+ irc_globops( fs_bot, "Warning, possible flood on %s. AJPP: %d/%d Sec, SampleTime %d", ci->c->name, ci->ajpp, (int)period, fscfg.joinsampletime );
break;
case 1:
/* close flood channel */
- nlog( LOG_WARNING, "Warning, possible flood on %s. Closing channel. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, period, fscfg.joinsampletime );
- irc_chanalert( fs_bot, "Warning, possible flood on %s. Closing channel. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, period, fscfg.joinsampletime );
- irc_globops( fs_bot, "Warning, possible flood on %s. Closing channel. AJPP: %d/%d Sec, SampleTime %d", ci->c->name, ci->ajpp, period, fscfg.joinsampletime );
+ nlog( LOG_WARNING, "Warning, possible flood on %s. Closing channel. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, (int)period, fscfg.joinsampletime );
+ irc_chanalert( fs_bot, "Warning, possible flood on %s. Closing channel. AJPP: %d/%d sec, SampleTime %d", ci->c->name, ci->ajpp, (int)period, fscfg.joinsampletime );
+ irc_globops( fs_bot, "Warning, possible flood on %s. Closing channel. AJPP: %d/%d Sec, SampleTime %d", ci->c->name, ci->ajpp, (int)period, fscfg.joinsampletime );
irc_chanprivmsg( fs_bot, ci->c->name, "Temporarily closing channel due to possible floodbot attack. Channel will be re-opened in %d seconds", fscfg.chanlocktime );
if( !ircstrcasecmp( fscfg.chanlockkey, "random" ) )
{
@@ -301,10 +301,10 @@
/* just some record keeping */
if( ci->ajpp > MaxAJPP )
{
- dlog( DEBUG1, "New AJPP record on %s with %d joins in %d seconds", cmdparams->channel->name, ci->ajpp, period );
+ dlog( DEBUG1, "New AJPP record on %s with %d joins in %d seconds", cmdparams->channel->name, ci->ajpp, (int)period );
if( fscfg.verbose )
{
- irc_chanalert( fs_bot, "New AJPP record on %s with %d joins in %d seconds", cmdparams->channel->name, ci->ajpp, period );
+ irc_chanalert( fs_bot, "New AJPP record on %s with %d joins in %d seconds", cmdparams->channel->name, ci->ajpp, (int)period );
}
MaxAJPP = ci->ajpp;
strlcpy( MaxAJPPChan, cmdparams->channel->name, MAXCHANLEN );
@@ -361,15 +361,15 @@
{
case 0:
/* warn only */
- nlog( LOG_WARNING, "Warning, possible topic flood on %s. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, period, fscfg.topicsampletime );
- irc_chanalert( fs_bot, "Warning, possible flood on %s. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, period, fscfg.topicsampletime );
- irc_globops( fs_bot, "Warning, possible flood on %s. CTC: %d/%d Sec, SampleTime %d", ci->c->name, ci->ctc, period, fscfg.topicsampletime );
+ nlog( LOG_WARNING, "Warning, possible topic flood on %s. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, (int)period, fscfg.topicsampletime );
+ irc_chanalert( fs_bot, "Warning, possible flood on %s. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, (int)period, fscfg.topicsampletime );
+ irc_globops( fs_bot, "Warning, possible flood on %s. CTC: %d/%d Sec, SampleTime %d", ci->c->name, ci->ctc, (int)period, fscfg.topicsampletime );
break;
case 1:
/* close flood channel */
- nlog( LOG_WARNING, "Warning, possible flood on %s. Closing channel. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, period, fscfg.topicsampletime );
- irc_chanalert( fs_bot, "Warning, possible flood on %s. Closing channel. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, period, fscfg.topicsampletime );
- irc_globops( fs_bot, "Warning, possible flood on %s. Closing channel. CTC: %d/%d Sec, SampleTime %d", ci->c->name, ci->ctc, period, fscfg.topicsampletime );
+ nlog( LOG_WARNING, "Warning, possible flood on %s. Closing channel. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, (int)period, fscfg.topicsampletime );
+ irc_chanalert( fs_bot, "Warning, possible flood on %s. Closing channel. CTC: %d/%d sec, SampleTime %d", ci->c->name, ci->ctc, (int)period, fscfg.topicsampletime );
+ irc_globops( fs_bot, "Warning, possible flood on %s. Closing channel. CTC: %d/%d Sec, SampleTime %d", ci->c->name, ci->ctc, (int)period, fscfg.topicsampletime );
irc_chanprivmsg( fs_bot, ci->c->name, "Temporarily locking channel topic due to possible attack. Channel Topic will be re-opened in %d seconds", fscfg.chanlocktime );
irc_cmode( fs_bot, ci->c->name, "+t", NULL );
ci->topic_locked = me.now;
@@ -381,10 +381,10 @@
/* just some record keeping */
if( ci->ctc > MaxCTC )
{
- dlog( DEBUG1, "New CTC record on %s with %d Topics in %d seconds", cmdparams->channel->name, ci->ctc, period );
+ dlog( DEBUG1, "New CTC record on %s with %d Topics in %d seconds", cmdparams->channel->name, ci->ctc, (int)period );
if( fscfg.verbose )
{
- irc_chanalert( fs_bot, "New CTC record on %s with %d joins in %d seconds", cmdparams->channel->name, ci->ctc, period );
+ irc_chanalert( fs_bot, "New CTC record on %s with %d joins in %d seconds", cmdparams->channel->name, ci->ctc, (int)period );
}
MaxCTC = ci->ctc;
strlcpy( MaxCTCChan, cmdparams->channel->name, MAXCHANLEN );
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.