Skip to content

Commit a477354

Browse files
authored
Merge pull request #9693 from naveenkaje/mbed_error_warning_fix
platform: fix build warning in mbed_error
2 parents ba7aa88 + de271d4 commit a477354

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

platform/mbed_error.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ static core_util_atomic_flag halt_in_progress = CORE_UTIL_ATOMIC_FLAG_INIT;
5050
static int error_count = 0;
5151
static mbed_error_ctx first_error_ctx = {0};
5252

53+
static mbed_error_ctx last_error_ctx = {0};
54+
static mbed_error_hook_t error_hook = NULL;
55+
static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsigned int error_value, const char *filename, int line_number, void *caller);
56+
5357
#if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
5458
//Global for populating the context in exception handler
5559
static mbed_error_ctx *const report_error_ctx = (mbed_error_ctx *)(ERROR_CONTEXT_LOCATION);
5660
static bool is_reboot_error_valid = false;
57-
#endif
58-
59-
static mbed_error_ctx last_error_ctx = {0};
60-
static mbed_error_hook_t error_hook = NULL;
61-
static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsigned int error_value, const char *filename, int line_number, void *caller);
6261

6362
//Helper function to calculate CRC
6463
//NOTE: It would have been better to use MbedCRC implementation. But
@@ -89,6 +88,7 @@ static unsigned int compute_crc32(const void *data, int datalen)
8988

9089
return crc;
9190
}
91+
#endif
9292

9393
//Helper function to halt the system
9494
static MBED_NORETURN void mbed_halt_system(void)

0 commit comments

Comments
 (0)