[core] Fix compilation warnings

This commit is contained in:
Kuba Szczodrzyński
2022-06-19 17:31:43 +02:00
parent c9fe63ec7b
commit cedfc2c8db
4 changed files with 7 additions and 6 deletions

View File

@@ -10,6 +10,10 @@ extern "C" {
fal_partition_t fal_root_part = NULL;
}
// Arduino framework initialization.
// May be redefined by family files.
void init() __attribute__((weak));
// Weak empty variant initialization function.
// May be redefined by variant files.
void initVariant() __attribute__((weak));

View File

@@ -118,12 +118,12 @@ uf2_err_t uf2_update_parts(uf2_ota_t *ctx, char *part1, char *part2) {
ctx->erased_length = 0;
if (part1[0]) {
ctx->part1 = fal_partition_find(part1);
ctx->part1 = (fal_partition_t)fal_partition_find(part1);
if (!ctx->part1)
return UF2_ERR_PART_404;
}
if (part2[0]) {
ctx->part2 = fal_partition_find(part2);
ctx->part2 = (fal_partition_t)fal_partition_find(part2);
if (!ctx->part2)
return UF2_ERR_PART_404;
}

View File

@@ -1,6 +1,7 @@
/* Copyright (c) Kuba Szczodrzyński 2022-05-16. */
#include <stddef.h>
#include <sdk_mem.h>
__attribute__((weak)) char *strdup(const char *s) {
size_t len = strlen(s) + 1;

View File

@@ -33,10 +33,6 @@ static __inline uint32_t __get_ipsr__(void) {
void *gpio_pin_struct[PINS_COUNT] = {NULL};
__attribute__((weak)) void init(void) {
// nop
}
void delay(uint32_t ms) {
/* osStatus ret; */