Permalink
Browse files

fix compiler warnings, thanks Morten Stevens

  • Loading branch information...
1 parent 681487a commit ed554db65dc06362fb009011075e29337f260c26 @Habbie Habbie committed Jul 1, 2013
Showing with 3 additions and 4 deletions.
  1. +0 −1 pdns/dnsbulktest.cc
  2. +1 −1 pdns/dnspcap.hh
  3. +1 −1 pdns/dnsscan.cc
  4. +1 −1 pdns/dnswasher.cc
View
@@ -294,7 +294,6 @@ int main(int argc, char** argv)
cerr<<"\n";
cerr<< "Mean response time: "<<mean(*sr.d_acc) << " msec"<<", median: "<<median(*sr.d_acc)<< " msec\n";
- typedef boost::iterator_range<std::vector<std::pair<double, double> >::iterator > histogram_type;
boost::format statfmt("Time < %6.03f msec %|30t|%6.03f%% cumulative\n");
View
@@ -87,7 +87,7 @@ public:
const struct tcphdr *d_tcp;
const struct udphdr *d_udp;
const uint8_t* d_payload;
- int d_len;
+ unsigned int d_len;
struct pdns_pcap_pkthdr d_pheader;
pdns_pcap_file_header d_pfh;
View
@@ -51,7 +51,7 @@ try
if(mdp.d_qtype < 256)
counts[mdp.d_qtype]++;
- for(int i=0; i < mdp.d_qname.length(); ++i)
+ for(unsigned int i=0; i < mdp.d_qname.length(); ++i)
if(!isalnum(mdp.d_qname[i]) && mdp.d_qname[i]!='.' && mdp.d_qname[i]!='-' && mdp.d_qname[i]!='_') {
// cout<<mdp.d_qname<<"|"<<mdp.d_qtype<<"|"<<mdp.d_qclass<<"\n";
// sock.sendTo(string(pr.d_payload, pr.d_payload + pr.d_len), remote);
View
@@ -55,7 +55,7 @@ try
IPObfuscator ipo;
while(pr.getUDPPacket()) {
- if(ntohs(pr.d_udp->uh_dport)==53 || ntohs(pr.d_udp->uh_sport)==53 && pr.d_len > sizeof(dnsheader)) {
+ if(ntohs(pr.d_udp->uh_dport)==53 || (ntohs(pr.d_udp->uh_sport)==53 && pr.d_len > sizeof(dnsheader))) {
dnsheader* dh=(dnsheader*)pr.d_payload;
uint32_t *src=(uint32_t*)&pr.d_ip->ip_src;

0 comments on commit ed554db

Please sign in to comment.