Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hujun260 authored and xiaoxiang781216 committed Dec 26, 2024
1 parent 15c1c9d commit c0f7dd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/esp_lowputc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/risc-v/src/common/espressif/esp_lowputc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/****************************************************************************
Expand Down

0 comments on commit c0f7dd9

Please sign in to comment.