Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jelu committed Mar 28, 2017
1 parent 2d4df8d commit 785d4c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions plugins/pcapdump/pcapdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <errno.h>
#include <assert.h>
#include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>

Expand Down
5 changes: 3 additions & 2 deletions plugins/rssm/rssm.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <errno.h>
#include <assert.h>
#include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#include <arpa/nameser.h>
Expand Down Expand Up @@ -213,8 +214,8 @@ rssm_save_counts(const char *sbuf)
logerr("%s: %s", sbuf, strerror(errno));
return;
}
fprintf(fp, "first-packet-time %lu\n", open_ts.tv_sec);
fprintf(fp, "last-packet-time %lu\n", clos_ts.tv_sec);
fprintf(fp, "first-packet-time %ld\n", (long)open_ts.tv_sec);
fprintf(fp, "last-packet-time %ld\n", (long)clos_ts.tv_sec);
fprintf(fp, "dns-udp-queries-received-ipv4 %"PRIu64"\n", counts.dns_udp_queries_received_ipv4);
fprintf(fp, "dns-udp-queries-received-ipv6 %"PRIu64"\n", counts.dns_udp_queries_received_ipv6);
fprintf(fp, "dns-tcp-queries-received-ipv4 %"PRIu64"\n", counts.dns_tcp_queries_received_ipv4);
Expand Down
2 changes: 1 addition & 1 deletion plugins/txtout/txtout.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ txtout_output(const char *descr, iaddr from, iaddr to, uint8_t proto, unsigned f
/*
* IP Stuff
*/
fprintf(out, "%10ld.%06ld", ts.tv_sec, (long)ts.tv_usec);
fprintf(out, "%10ld.%06ld", (long)ts.tv_sec, (long)ts.tv_usec);
fprintf(out, " %s %u", ia_str(from), sport);
fprintf(out, " %s %u", ia_str(to), dport);
fprintf(out, " %hhu", proto);
Expand Down

0 comments on commit 785d4c4

Please sign in to comment.