diff options
author | Stef Walter <stef@memberwebs.com> | 2010-01-13 15:48:28 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2010-01-13 15:48:28 +0000 |
commit | 8da4a095b4f6bdc8ba3f96c76ab789bc2c330281 (patch) | |
tree | 1f1068e1f05344123f23d3106ae3bf58029606b0 | |
parent | 2fcfa4e3b89f6eaf3fd592379459fb7e53dde3b6 (diff) |
Fix some warnings on amd64 architecture.
-rw-r--r-- | module/bsnmp-jails.c | 8 | ||||
-rw-r--r-- | tools/jail-measure.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/module/bsnmp-jails.c b/module/bsnmp-jails.c index 48e1148..cfd0008 100644 --- a/module/bsnmp-jails.c +++ b/module/bsnmp-jails.c @@ -525,7 +525,7 @@ monitor_create (const char *device) goto cleanup; } - if (pcap_compile (mon->handle, &mon->filter, network_filter, 1, 0) < 0) { + if (pcap_compile (mon->handle, &mon->filter, (const char*)network_filter, 1, 0) < 0) { emsg ("couldn't compile monitor expression: %s", pcap_geterr (mon->handle)); goto cleanup; } @@ -1449,7 +1449,7 @@ op_jailconfig (struct snmp_context *ctx, struct snmp_value *value, switch (op) { case SNMP_OP_SET: if ((r = string_save (value, ctx, -1, &network_filter)) == SNMP_ERR_NOERROR) { - if (monitor_test_filter (network_filter) < 0) + if (monitor_test_filter ((const char*)network_filter) < 0) r = SNMP_ERR_GENERR; } if (r != SNMP_ERR_NOERROR) @@ -1543,7 +1543,7 @@ op_jailentry (struct snmp_context *ctx, struct snmp_value *value, value->v.integer = jail->index; return SNMP_ERR_NOERROR; case LEAF_jailHost: - return string_get (value, jail->host, -1); + return string_get (value, (u_char*)jail->host, -1); case LEAF_jailInOctets: value->v.counter64 = jail->in_octets; return SNMP_ERR_NOERROR; @@ -1691,7 +1691,7 @@ module_init (struct lmodule *mod, int argc, char *argv[]) /* Setup all our own structures */ - network_filter = strdup ("ip or ip6"); + network_filter = (u_char*)strdup ("ip or ip6"); if (!network_filter) goto cleanup; diff --git a/tools/jail-measure.c b/tools/jail-measure.c index cba90a2..9c57ded 100644 --- a/tools/jail-measure.c +++ b/tools/jail-measure.c @@ -142,8 +142,8 @@ measure_jail (const char *path) fts_close (fts); - printf ("jail-space: %llu %s\n", jail_blocks * 512, path); - printf ("jail-files: %llu %s\n", jail_files, path); + printf ("jail-space: %llu %s\n", (long long unsigned)(jail_blocks * 512), path); + printf ("jail-files: %llu %s\n", (long long unsigned)jail_files, path); } int |