wifi_drv: fix compile warnings with gcc 10

Fixes #4202
This commit is contained in:
Martin Stein 2021-06-17 12:41:50 +02:00 committed by Christian Helmuth
parent 16c4aacf34
commit 0dc7084b0f
7 changed files with 16 additions and 16 deletions

View File

@ -44,7 +44,8 @@ extern "C" int pci_register_driver(struct pci_driver *driver)
pci_device_id const *matching_id = nullptr; pci_device_id const *matching_id = nullptr;
for (pci_device_id const *id = id_table; id->device; id++) { for (pci_device_id const *id = id_table; id->device; id++) {
if ((id->device == device_id) && if ((id->device == device_id) &&
(id->subdevice == PCI_ANY_ID || id->subdevice == subdevice_id)) { (id->subdevice == (unsigned int)PCI_ANY_ID ||
id->subdevice == subdevice_id)) {
matching_id = id; matching_id = id;
break; break;
} }

View File

@ -247,6 +247,7 @@ ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags)
w_msg.msg_name = msg->msg_name; w_msg.msg_name = msg->msg_name;
w_msg.msg_namelen = msg->msg_namelen; w_msg.msg_namelen = msg->msg_namelen;
w_msg.msg_iovlen = msg->msg_iovlen; w_msg.msg_iovlen = msg->msg_iovlen;
w_msg.msg_count = 0;
for (unsigned i = 0; i < w_msg.msg_iovlen; ++i) { for (unsigned i = 0; i < w_msg.msg_iovlen; ++i) {
w_msg.msg_iov[i].iov_base = msg->msg_iov[i].iov_base; w_msg.msg_iov[i].iov_base = msg->msg_iov[i].iov_base;
w_msg.msg_iov[i].iov_len = msg->msg_iov[i].iov_len; w_msg.msg_iov[i].iov_len = msg->msg_iov[i].iov_len;
@ -306,6 +307,7 @@ ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags)
w_msg.msg_name = msg->msg_name; w_msg.msg_name = msg->msg_name;
w_msg.msg_namelen = msg->msg_namelen; w_msg.msg_namelen = msg->msg_namelen;
w_msg.msg_iovlen = msg->msg_iovlen; w_msg.msg_iovlen = msg->msg_iovlen;
w_msg.msg_count = 0;
for (unsigned i = 0; i < w_msg.msg_iovlen; ++i) { for (unsigned i = 0; i < w_msg.msg_iovlen; ++i) {
w_msg.msg_iov[i].iov_base = msg->msg_iov[i].iov_base; w_msg.msg_iov[i].iov_base = msg->msg_iov[i].iov_base;
w_msg.msg_iov[i].iov_len = msg->msg_iov[i].iov_len; w_msg.msg_iov[i].iov_len = msg->msg_iov[i].iov_len;

View File

@ -210,7 +210,6 @@ DUMMY(0, ipv4_get_dsfield)
DUMMY(0, ipv6_get_dsfield) DUMMY(0, ipv6_get_dsfield)
DUMMY(0, ipv6_hdr) DUMMY(0, ipv6_hdr)
DUMMY(0, irqs_disabled) DUMMY(0, irqs_disabled)
DUMMY(0, isalpha)
DUMMY(0, jhash_2words) DUMMY(0, jhash_2words)
DUMMY(0, kobject_uevent) DUMMY(0, kobject_uevent)
DUMMY(0, kobject_uevent_env) DUMMY(0, kobject_uevent_env)
@ -282,7 +281,6 @@ DUMMY(0, smp_rmb)
DUMMY(0, sock_net) DUMMY(0, sock_net)
DUMMY(0, sock_release) DUMMY(0, sock_release)
DUMMY(0, spin_trylock) DUMMY(0, spin_trylock)
DUMMY(0, sscanf)
DUMMY(0, synchronize_irq) DUMMY(0, synchronize_irq)
DUMMY(0, synchronize_rcu_expedited) DUMMY(0, synchronize_rcu_expedited)
DUMMY(0, tasklet_disable) DUMMY(0, tasklet_disable)
@ -458,7 +456,6 @@ DUMMY(0, udp_hdr)
DUMMY(0, virt_to_page) DUMMY(0, virt_to_page)
DUMMY(0, xfrm_sk_clone_policy) DUMMY(0, xfrm_sk_clone_policy)
DUMMY(0, xfrm_sk_free_policy) DUMMY(0, xfrm_sk_free_policy)
DUMMY(0, strncpy)
DUMMY(0, __ethtool_get_settings) DUMMY(0, __ethtool_get_settings)
DUMMY(0, __skb_get_hash) DUMMY(0, __skb_get_hash)

View File

@ -353,7 +353,7 @@ struct page
atomic_t _count; atomic_t _count;
void *addr; void *addr;
unsigned long private; unsigned long private;
} __attribute((packed)); };
/********************** /**********************

View File

@ -1551,7 +1551,7 @@ struct Idr
if (_barray.get(index, 1)) { return false; } if (_barray.get(index, 1)) { return false; }
_barray.set(index, 1); _barray.set(index, 1);
_ptr[index] = ptr; _ptr[index] = (addr_t)ptr;
return true; return true;
} }

View File

@ -54,6 +54,5 @@ DUMMY(0, getprotobynumber)
DUMMY(0, nl_addr_get_binary_addr) DUMMY(0, nl_addr_get_binary_addr)
DUMMY(0, nl_addr_get_len) DUMMY(0, nl_addr_get_len)
DUMMY(0, nl_hash_any) DUMMY(0, nl_hash_any)
DUMMY(0, rint)
} /* extern "C" */ } /* extern "C" */

View File

@ -35,6 +35,7 @@
/* rep includes */ /* rep includes */
#include <wifi/ctrl.h> #include <wifi/ctrl.h>
typedef unsigned unaligned_unsigned __attribute__ ((aligned (1)));
struct ctrl_iface_priv { struct ctrl_iface_priv {
struct wpa_supplicant *wpa_s; struct wpa_supplicant *wpa_s;
@ -42,19 +43,19 @@ struct ctrl_iface_priv {
int level; int level;
/* TODO replace w/ Msg_buffer */ /* TODO replace w/ Msg_buffer */
char *send_buffer; char *send_buffer;
size_t send_buffer_size; size_t send_buffer_size;
unsigned *send_id; unaligned_unsigned *send_id;
char *recv_buffer; char *recv_buffer;
size_t recv_buffer_size; size_t recv_buffer_size;
unsigned *recv_id; unaligned_unsigned *recv_id;
unsigned last_recv_id; unsigned last_recv_id;
char *event_buffer; char *event_buffer;
size_t event_buffer_size; size_t event_buffer_size;
unsigned *event_id; unaligned_unsigned *event_id;
}; };