This is an automated email from the ASF dual-hosted git repository. raiden00 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 694c0f0b7f8f7afafc832c2f93f3fad870248ea9 Author: Xiang Xiao <[email protected]> AuthorDate: Sat Jun 3 20:19:54 2023 +0800 usbhost/cdcacm: Fix the compiler warning when serial dma is enabled CP: nuttx/nuttx/include/nuttx/config.h CC: mqueue/mq_sndinternal.c usbhost/usbhost_cdcacm.c:435:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘void (*)(struct uart_dev_s *, _Bool)’ [-Wincompatible-pointer-types] 435 | usbhost_txint, /* txinit */ | ^~~~~~~~~~~~~ usbhost/usbhost_cdcacm.c:435:3: note: (near initialization for ‘g_uart_ops.dmareceive’) usbhost/usbhost_cdcacm.c:436:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types] 436 | usbhost_txready, /* txready */ | ^~~~~~~~~~~~~~~ usbhost/usbhost_cdcacm.c:436:3: note: (near initialization for ‘g_uart_ops.dmarxfree’) usbhost/usbhost_cdcacm.c:437:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types] 437 | usbhost_txempty /* txempty */ | ^~~~~~~~~~~~~~~ usbhost/usbhost_cdcacm.c:437:3: note: (near initialization for ‘g_uart_ops.dmatxavail’) Signed-off-by: Xiang Xiao <[email protected]> --- drivers/usbhost/usbhost_cdcacm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/usbhost/usbhost_cdcacm.c b/drivers/usbhost/usbhost_cdcacm.c index fb900fe3d8..4dc4e2c99f 100644 --- a/drivers/usbhost/usbhost_cdcacm.c +++ b/drivers/usbhost/usbhost_cdcacm.c @@ -425,11 +425,21 @@ static const struct uart_ops_s g_uart_ops = usbhost_attach, /* attach */ usbhost_detach, /* detach */ usbhost_ioctl, /* ioctl */ - NULL , /* receive */ + NULL, /* receive */ usbhost_rxint, /* rxinit */ usbhost_rxavailable, /* rxavailable */ #ifdef CONFIG_SERIAL_IFLOWCONTROL usbhost_rxflowcontrol, /* rxflowcontrol */ +#endif +#ifdef CONFIG_SERIAL_TXDMA + NULL, /* dmasend */ +#endif +#ifdef CONFIG_SERIAL_RXDMA + NULL, /* dmareceive */ + NULL, /* dmarxfree */ +#endif +#ifdef CONFIG_SERIAL_TXDMA + NULL, /* dmatxavail */ #endif NULL, /* send */ usbhost_txint, /* txinit */
