Mercurial > syslog2iptables
changeset 59:f133196b8591
fix c++11 compiler warnings
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 10 Jun 2014 09:03:08 -0700 |
parents | b45dddebe8fc |
children | a20b31625b44 |
files | src/syslog2iptables.cpp src/syslogconfig.cpp |
diffstat | 2 files changed, 34 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/src/syslog2iptables.cpp Tue Jun 10 08:48:53 2014 -0700 +++ b/src/syslog2iptables.cpp Tue Jun 10 09:03:08 2014 -0700 @@ -91,7 +91,6 @@ // void* config_loader(void *arg); void* config_loader(void *arg) { - typedef set<CONFIG *> configp_set; while (loader_run) { sleep(180); // look for modifications every 3 minutes if (!loader_run) break;
--- a/src/syslogconfig.cpp Tue Jun 10 08:48:53 2014 -0700 +++ b/src/syslogconfig.cpp Tue Jun 10 09:03:08 2014 -0700 @@ -656,7 +656,7 @@ } if (!tsa(tok, token_semi)) return false; IPPAIR pair; - const int masks[33] = {0xffffffff, // 0 + const unsigned int masks[33] = {0xffffffff, // 0 0x7fffffff, // 1 0x3fffffff, // 2 0x1fffffff, // 3 @@ -690,7 +690,7 @@ 0x00000001, // 31 0x00000000}; // 32 pair.first = ipaddr; - pair.last = ipaddr | masks[mask]; + pair.last = ipaddr | (int)masks[mask]; pair.cidr = mask; me.add_pair(pair); }