Fix implicit declaration warning #2093

Merged
yh-sb merged 1 commit from master into develop 2024-11-24 19:44:36 -06:00
yh-sb commented 2024-11-24 12:02:41 -06:00 (Migrated from github.com)

Fix the following implicit declaration warnings:

[1/4] Building C object CMakeFiles/rp2040.dir/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c.obj
D:/dev/cpp/mcu-cpp/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c: In function 'default_enter_safe_zone_timeout_ms':
D:/dev/cpp/mcu-cpp/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c:155:33: warning: implicit declaration of function 'make_timeout_time_ms' [-Wimplicit-function-declaration]
  155 |         absolute_time_t until = make_timeout_time_ms(timeout_ms);
      |                                 ^~~~~~~~~~~~~~~~~~~~
D:/dev/cpp/mcu-cpp/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c:156:77: warning: implicit declaration of function 'time_reached' [-Wimplicit-function-declaration]
  156 |         while (lockout_state[core_num] != FREERTOS_LOCKOUT_LOCKEE_READY && !time_reached(until)) {
      |                                                                             ^~~~~~~~~~~~
Fix the following `implicit declaration` warnings: ```sh [1/4] Building C object CMakeFiles/rp2040.dir/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c.obj D:/dev/cpp/mcu-cpp/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c: In function 'default_enter_safe_zone_timeout_ms': D:/dev/cpp/mcu-cpp/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c:155:33: warning: implicit declaration of function 'make_timeout_time_ms' [-Wimplicit-function-declaration] 155 | absolute_time_t until = make_timeout_time_ms(timeout_ms); | ^~~~~~~~~~~~~~~~~~~~ D:/dev/cpp/mcu-cpp/third_party/pico-sdk/src/rp2_common/pico_flash/flash.c:156:77: warning: implicit declaration of function 'time_reached' [-Wimplicit-function-declaration] 156 | while (lockout_state[core_num] != FREERTOS_LOCKOUT_LOCKEE_READY && !time_reached(until)) { | ^~~~~~~~~~~~ ```
lurch (Migrated from github.com) reviewed 2024-11-24 18:31:57 -06:00
@ -9,6 +9,7 @@
#if PICO_FLASH_SAFE_EXECUTE_PICO_SUPPORT_MULTICORE_LOCKOUT
#include "pico/multicore.h"
#endif
#include "pico/time.h"
lurch (Migrated from github.com) commented 2024-11-24 18:31:57 -06:00

Looking at the location of the lines you quoted in your warning message, I guess this #include ought to be moved inside the #if PICO_FLASH_SAFE_EXECUTE_USE_FREERTOS_SMP section?

Looking at the location of the lines you quoted in your warning message, I guess this `#include` ought to be moved inside the `#if PICO_FLASH_SAFE_EXECUTE_USE_FREERTOS_SMP` section?
kilograham (Migrated from github.com) approved these changes 2024-11-24 19:31:48 -06:00
kilograham (Migrated from github.com) reviewed 2024-11-24 19:32:39 -06:00
@ -9,6 +9,7 @@
#if PICO_FLASH_SAFE_EXECUTE_PICO_SUPPORT_MULTICORE_LOCKOUT
#include "pico/multicore.h"
#endif
#include "pico/time.h"
kilograham (Migrated from github.com) commented 2024-11-24 19:32:39 -06:00

I'm fine with it as i I think

I'm fine with it as i I think
kilograham (Migrated from github.com) approved these changes 2024-11-24 19:32:46 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!2093
No description provided.