fix compile error
CC: pthread/pthread_exit.c common/espressif/esp_lowputc.c: In function 'esp_lowputc_disable_all_uart_int': common/espressif/esp_lowputc.c:215:29: error: passing argument 1 of 'spin_lock_irqsave' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 215 | flags = spin_lock_irqsave(&priv->lock); | ^~~~~~~~~~~ In file included from common/espressif/esp_lowputc.c:40: /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:511:55: note: expected 'volatile spinlock_t *' {aka 'volatile unsigned int *'} but argument is of type 'const spinlock_t *' {aka 'const unsigned int *'} 511 | irqstate_t spin_lock_irqsave(FAR volatile spinlock_t *lock) | ~~~~~~~~~~~~~~~~~~~~~^~~~ common/espressif/esp_lowputc.c:232:26: error: passing argument 1 of 'spin_unlock_irqrestore' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 232 | spin_unlock_irqrestore(&priv->lock, flags); | ^~~~~~~~~~~ /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:674:54: note: expected 'volatile spinlock_t *' {aka 'volatile unsigned int *'} but argument is of type 'const spinlock_t *' {aka 'const unsigned int *'} 674 | void spin_unlock_irqrestore(FAR volatile spinlock_t *lock, Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
15c1c9d42e
commit
c0f7dd979e
2 changed files with 2 additions and 2 deletions
|
@ -207,7 +207,7 @@ void esp_lowputc_enable_sysclk(const struct esp_uart_s *priv)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_lowputc_disable_all_uart_int(const struct esp_uart_s *priv,
|
||||
void esp_lowputc_disable_all_uart_int(struct esp_uart_s *priv,
|
||||
uint32_t *current_status)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
|
|
@ -129,7 +129,7 @@ void esp_lowputc_enable_sysclk(const struct esp_uart_s *priv);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp_lowputc_disable_all_uart_int(const struct esp_uart_s *priv,
|
||||
void esp_lowputc_disable_all_uart_int(struct esp_uart_s *priv,
|
||||
uint32_t *current_status);
|
||||
|
||||
/****************************************************************************
|
||||
|
|
Loading…
Reference in a new issue