Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/esp32c3-legacy: Add missing include to esp32c3_boot.c #14720

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

no1wudi
Copy link
Contributor

@no1wudi no1wudi commented Nov 11, 2024

Summary

up_perf_init defined in nuttx/arch.h, if CONFIG_ARCH_PERF_EVENTS enabled the compiler will raise a error:

board/esp32c3_boot.c:55:3: error: implicit declaration of function 'up_perf_init' [-Wimplicit-function-declaration]
   55 |   up_perf_init(NULL);
      |   ^~~~~~~~~~~~
board/esp32c3_boot.c:55:16: error: 'NULL' undeclared (first use in this function)
   55 |   up_perf_init(NULL);
      |                ^~~~
board/esp32c3_boot.c:28:1: note: 'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
   27 | #include <nuttx/board.h>
  +++ |+#include <stddef.h>
   28 |
board/esp32c3_boot.c:55:16: note: each undeclared identifier is reported only once for each function it appears in
   55 |   up_perf_init(NULL);
      |                ^~~~
make[1]: *** [/home/huang/Work/nx/nuttx/boards/Board.mk:83: esp32c3_boot.o] Error 1

Impact

boards/esp32c3-legacy

Testing

Local machine

`up_perf_init` defined in `nuttx/arch.h`, if CONFIG_ARCH_PERF_EVENTS enabled the compiler will raise a error:
```
board/esp32c3_boot.c:55:3: error: implicit declaration of function 'up_perf_init' [-Wimplicit-function-declaration]
   55 |   up_perf_init(NULL);
      |   ^~~~~~~~~~~~
board/esp32c3_boot.c:55:16: error: 'NULL' undeclared (first use in this function)
   55 |   up_perf_init(NULL);
      |                ^~~~
board/esp32c3_boot.c:28:1: note: 'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
   27 | #include <nuttx/board.h>
  +++ |+#include <stddef.h>
   28 |
board/esp32c3_boot.c:55:16: note: each undeclared identifier is reported only once for each function it appears in
   55 |   up_perf_init(NULL);
      |                ^~~~
make[1]: *** [/home/huang/Work/nx/nuttx/boards/Board.mk:83: esp32c3_boot.o] Error 1
```
@github-actions github-actions bot added Board: risc-v Size: XS The size of the change in this PR is very small labels Nov 11, 2024
@xiaoxiang781216 xiaoxiang781216 merged commit 52b0df1 into apache:master Nov 11, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Board: risc-v Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants