nuttx/net/local/local_netpoll.c

393 lines
9.8 KiB
C
Raw Normal View History

/****************************************************************************
* net/local/local_netpoll.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <unistd.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include <poll.h>
#include <nuttx/semaphore.h>
#include <nuttx/net/net.h>
#include <nuttx/fs/fs.h>
#include "socket/socket.h"
#include "local/local.h"
/****************************************************************************
* Name: local_event_pollsetup
****************************************************************************/
#ifdef CONFIG_NET_LOCAL_STREAM
static int local_event_pollsetup(FAR struct local_conn_s *conn,
FAR struct pollfd *fds,
bool setup)
{
pollevent_t eventset;
int ret = OK;
int i;
net_lock();
if (setup)
{
/* This is a request to set up the poll. Find an available
* slot for the poll structure reference
*/
for (i = 0; i < LOCAL_NPOLLWAITERS; i++)
{
/* Find an available slot */
if (!conn->lc_event_fds[i])
{
/* Bind the poll structure and this slot */
conn->lc_event_fds[i] = fds;
fds->priv = &conn->lc_event_fds[i];
break;
}
}
if (i >= LOCAL_NPOLLWAITERS)
{
fds->priv = NULL;
ret = -EBUSY;
goto errout;
}
eventset = 0;
if (conn->lc_state == LOCAL_STATE_LISTENING &&
dq_peek(&conn->u.server.lc_waiters) != NULL)
{
eventset |= POLLIN;
}
local_event_pollnotify(conn, eventset);
}
else
{
/* This is a request to tear down the poll. */
struct pollfd **slot = (struct pollfd **)fds->priv;
if (!slot)
{
ret = -EIO;
goto errout;
}
/* Remove all memory of the poll setup */
*slot = NULL;
fds->priv = NULL;
}
errout:
net_unlock();
return ret;
}
/****************************************************************************
* Name: local_inout_poll_cb
****************************************************************************/
static void local_inout_poll_cb(FAR struct pollfd *fds)
{
FAR struct pollfd *originfds = fds->arg;
poll_notify(&originfds, 1, fds->revents);
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: local_event_pollnotify
****************************************************************************/
void local_event_pollnotify(FAR struct local_conn_s *conn,
pollevent_t eventset)
{
#ifdef CONFIG_NET_LOCAL_STREAM
poll_notify(conn->lc_event_fds, LOCAL_NPOLLWAITERS, eventset);
#endif
}
/****************************************************************************
* Name: local_pollsetup
*
* Description:
* Setup to monitor events on one Unix domain socket
*
* Input Parameters:
* psock - The Unix domain socket of interest
* fds - The structure describing the events to be monitored, OR NULL if
* this is a request to stop monitoring events.
*
* Returned Value:
* 0: Success; Negated errno on failure
*
****************************************************************************/
int local_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
{
FAR struct local_conn_s *conn;
int ret = -ENOSYS;
conn = (FAR struct local_conn_s *)psock->s_conn;
if (conn->lc_proto == SOCK_DGRAM)
{
return ret;
}
#ifdef CONFIG_NET_LOCAL_STREAM
if ((conn->lc_state == LOCAL_STATE_LISTENING ||
conn->lc_state == LOCAL_STATE_CONNECTING) &&
conn->lc_type == LOCAL_TYPE_PATHNAME)
{
return local_event_pollsetup(conn, fds, true);
}
if (conn->lc_state == LOCAL_STATE_DISCONNECTED)
{
fds->priv = NULL;
goto pollerr;
}
switch (fds->events & (POLLIN | POLLOUT))
{
case (POLLIN | POLLOUT):
{
FAR struct pollfd *shadowfds;
/* Poll wants to check state for both input and output. */
if (conn->lc_infile.f_inode == NULL ||
conn->lc_outfile.f_inode == NULL)
{
fds->priv = NULL;
goto pollerr;
}
/* Find shadow pollfds. */
net_lock();
shadowfds = conn->lc_inout_fds;
while (shadowfds->fd != 0)
{
shadowfds += 2;
if (shadowfds >= &conn->lc_inout_fds[2*LOCAL_NPOLLWAITERS])
{
net_unlock();
return -ENOMEM;
}
}
shadowfds[0] = *fds;
shadowfds[0].fd = 1; /* Does not matter */
shadowfds[0].cb = local_inout_poll_cb;
shadowfds[0].arg = fds;
shadowfds[0].events &= ~POLLOUT;
shadowfds[1] = *fds;
shadowfds[1].fd = 0; /* Does not matter */
shadowfds[1].cb = local_inout_poll_cb;
shadowfds[1].arg = fds;
shadowfds[1].events &= ~POLLIN;
net_unlock();
/* Setup poll for both shadow pollfds. */
ret = file_poll(&conn->lc_infile, &shadowfds[0], true);
if (ret >= 0)
{
ret = file_poll(&conn->lc_outfile, &shadowfds[1], true);
if (ret < 0)
{
file_poll(&conn->lc_infile, &shadowfds[0], false);
}
}
if (ret < 0)
{
shadowfds[0].fd = 0;
fds->priv = NULL;
goto pollerr;
}
else
{
fds->priv = shadowfds;
}
}
break;
case POLLIN:
{
/* Poll wants to check state for input only. */
if (conn->lc_infile.f_inode == NULL)
{
fds->priv = NULL;
goto pollerr;
}
ret = file_poll(&conn->lc_infile, fds, true);
}
break;
case POLLOUT:
{
/* Poll wants to check state for output only. */
if (conn->lc_outfile.f_inode == NULL)
{
fds->priv = NULL;
goto pollerr;
}
ret = file_poll(&conn->lc_outfile, fds, true);
}
break;
default:
ret = OK;
break;
}
#endif
return ret;
#ifdef CONFIG_NET_LOCAL_STREAM
pollerr:
poll_notify(&fds, 1, POLLERR);
return OK;
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
#endif
}
/****************************************************************************
* Name: local_pollteardown
*
* Description:
* Teardown monitoring of events on a Unix domain socket
*
* Input Parameters:
* psock - The Unix domain socket of interest
* fds - The structure describing the events to be monitored, OR NULL if
* this is a request to stop monitoring events.
*
* Returned Value:
* 0: Success; Negated errno on failure
*
****************************************************************************/
int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
{
FAR struct local_conn_s *conn;
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
int ret = OK;
conn = (FAR struct local_conn_s *)psock->s_conn;
if (conn->lc_proto == SOCK_DGRAM)
{
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
return -ENOSYS;
}
#ifdef CONFIG_NET_LOCAL_STREAM
if ((conn->lc_state == LOCAL_STATE_LISTENING ||
conn->lc_state == LOCAL_STATE_CONNECTING) &&
conn->lc_type == LOCAL_TYPE_PATHNAME)
{
return local_event_pollsetup(conn, fds, false);
}
if (conn->lc_state == LOCAL_STATE_DISCONNECTED)
{
return OK;
}
switch (fds->events & (POLLIN | POLLOUT))
{
case (POLLIN | POLLOUT):
{
FAR struct pollfd *shadowfds = fds->priv;
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
int ret2;
if (shadowfds == NULL)
{
return OK;
}
/* Teardown for both shadow pollfds. */
ret = file_poll(&conn->lc_infile, &shadowfds[0], false);
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
ret2 = file_poll(&conn->lc_outfile, &shadowfds[1], false);
if (ret2 < 0)
{
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
ret = ret2;
}
fds->revents |= shadowfds[0].revents | shadowfds[1].revents;
fds->priv = NULL;
shadowfds[0].fd = 0;
}
break;
case POLLIN:
{
if (fds->priv == NULL)
{
return OK;
}
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
ret = file_poll(&conn->lc_infile, fds, false);
}
break;
case POLLOUT:
{
if (fds->priv == NULL)
{
return OK;
}
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
ret = file_poll(&conn->lc_outfile, fds, false);
}
break;
default:
break;
}
#endif
nuttx: Fix the nightly build warning lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 142 | .send = spi_send, | ^~~~~~~~ lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send') In file included from ieee802154/mac802154_bind.c:49: ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode': ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 788 | (FAR const union ieee802154_attr_u *)&mode); | ^~~~~~~~~~~~~~~~~ chip/stm32_hciuart.c: In function 'hciuart_read': chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value] 2104 | ntotal == (ssize_t)ret; | ~~~~~~~^~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 579 | type = bcmf_getle32(&event->type); | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 580 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler': wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 619 | status = bcmf_getle32(&event->status); | ^~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 620 | escan_result_len = bcmf_getle32(&event->len); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame': wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member] 166 | event_id = bcmf_getle32(&event_msg->event.type); | ^~~~~~~~~~~~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct': wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 157 | ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended': wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 239 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 244 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 257 | ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp); | ^~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] 265 | SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp); | ^~~~~~~~~~~ wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here 79 | begin_packed_struct struct sdio_resp_R5 | ^~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable] 2860 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable] 3044 | int ret; | ^~~ chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function] 722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/gs2200m.c: In function 'gs2200m_read': wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types] 727 | ret = nxsem_wait(dev); | ^~~ | | | struct gs2200m_dev_s * .config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined 69 | inline bool cxd56_audio_clock_is_enabled(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined 68 | inline void cxd56_audio_clock_disable(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~ platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined 67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div); | ^~~~~~~~~~~~~~~~~~~~~~~~ chip/stm32_adc.c: In function 'adc_reset': chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable] 1348 | int ret; | ^~~ chip/stm32_adc.c: In function 'adc_shutdown': chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable] 1496 | int ret; | ^~~ chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function] 729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character 147 | # warning OOK support is not complete, RX+TX doesn't work yet! | ^ str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types] 435 | .send = spi_send, | ^~~~~~~~ str71_spi.c:435:24: note: (near initialization for 'g_spiops.send') chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function] static inline uint32_t pic32mx_getreg(uintptr_t uart_base, ^ chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function] static inline bool pic32mx_value(uint16_t pinset) ^ chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function] static inline bool pic32mz_value(pinset_t pinset) ^ chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function] pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno) ^ mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged': mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void return ret; ^ In file included from partition/fs_partition.c:42:0: partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function] static inline int read_partition_block(FAR struct partition_state_s *state, ^ local/local_netpoll.c: In function 'local_pollsetup': local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label] pollerr: ^~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-12 15:52:28 +02:00
return ret;
}