diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-01 13:53:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-01 18:05:00 +0100 |
commit | a8d51bf0ce26fd26e00338540857f43b8a99e126 (patch) | |
tree | 917f249fbf6873280161959c74a71b8edb0f4cea /pfinet | |
parent | e2b75a67395fbbdd36bb0bceaea2465a2a1fa172 (diff) | |
download | hurd-a8d51bf0ce26fd26e00338540857f43b8a99e126.tar.gz hurd-a8d51bf0ce26fd26e00338540857f43b8a99e126.tar.bz2 hurd-a8d51bf0ce26fd26e00338540857f43b8a99e126.zip |
Fix build warnings
No actual behavior change.
Diffstat (limited to 'pfinet')
-rw-r--r-- | pfinet/ethernet.c | 10 | ||||
-rw-r--r-- | pfinet/glue-include/linux/malloc.h | 2 | ||||
-rw-r--r-- | pfinet/iioctl-ops.c | 2 | ||||
-rw-r--r-- | pfinet/io-ops.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c index 5c69b54a..c317820c 100644 --- a/pfinet/ethernet.c +++ b/pfinet/ethernet.c @@ -71,7 +71,7 @@ ethernet_set_multi (struct device *dev) { } -static short ether_filter[] = +static filter_t ether_filter[] = { #ifdef NETF_IN /* We have to tell the packet filtering code that we're interested in @@ -93,7 +93,7 @@ static struct bpf_insn bpf_ether_filter[] = {BPF_RET|BPF_K, 0, 0, 1500}, /* And return 1500 bytes */ {BPF_RET|BPF_K, 0, 0, 0}, /* Or discard it all */ }; -static int bpf_ether_filter_len = sizeof (bpf_ether_filter) / sizeof (short); +static int bpf_ether_filter_len = sizeof (bpf_ether_filter) / (sizeof (short)); static struct port_bucket *etherport_bucket; @@ -219,7 +219,7 @@ ethernet_open (struct device *dev) err = device_set_filter (edev->ether_port, ports_get_right (edev->readpt), MACH_MSG_TYPE_MAKE_SEND, 0, - bpf_ether_filter, bpf_ether_filter_len); + (filter_array_t) bpf_ether_filter, bpf_ether_filter_len); if (err) error (2, err, "device_set_filter on %s", dev->name); } @@ -273,13 +273,13 @@ ethernet_xmit (struct sk_buff *skb, struct device *dev) { error_t err; struct ether_device *edev = (struct ether_device *) dev->priv; - u_int count; + int count; u_int tried = 0; do { tried++; - err = device_write (edev->ether_port, D_NOWAIT, 0, skb->data, skb->len, &count); + err = device_write (edev->ether_port, D_NOWAIT, 0, (io_buf_ptr_t) skb->data, skb->len, &count); if (err == EMACH_SEND_INVALID_DEST || err == EMIG_SERVER_DIED) { /* Device probably just died, try to reopen it. */ diff --git a/pfinet/glue-include/linux/malloc.h b/pfinet/glue-include/linux/malloc.h index 46ae1051..276ee8eb 100644 --- a/pfinet/glue-include/linux/malloc.h +++ b/pfinet/glue-include/linux/malloc.h @@ -8,7 +8,7 @@ static inline void *kmalloc (size_t sz, int ignored) { return malloc (sz); } static inline void kfree (void *ptr) { free (ptr); } static inline void kfree_s (void *ptr, size_t sz) { free (ptr); } -#define free(x) kfree(x) /* just don't ask */ +//#define free(x) kfree(x) /* just don't ask */ typedef struct kmem_cache_s kmem_cache_t; diff --git a/pfinet/iioctl-ops.c b/pfinet/iioctl-ops.c index be659582..72e557d9 100644 --- a/pfinet/iioctl-ops.c +++ b/pfinet/iioctl-ops.c @@ -192,7 +192,7 @@ S_iioctl_siocsifflags (struct sock_user *user, /* 17 SIOCGIFFLAGS -- Get flags of a network interface. */ kern_return_t S_iioctl_siocgifflags (struct sock_user *user, - char *name, + ifname_t name, short *flags) { error_t err = 0; diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c index 2e7dc641..a4b012c0 100644 --- a/pfinet/io-ops.c +++ b/pfinet/io-ops.c @@ -567,7 +567,7 @@ S_io_get_icky_async_id (struct sock_user *user, error_t S_io_server_version (struct sock_user *user, - char *name, + string_t name, int *major, int *minor, int *edit) |