Skip to content

Commit 7511e2e

Browse files
dgarskedanielinux
authored andcommitted
Fix some compiler warnings and CI build test failures
1 parent 78bed07 commit 7511e2e

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

arch.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,10 @@ ifeq ($(ARCH),RISCV64)
589589

590590
ifneq ($(NO_ASM),1)
591591
CFLAGS+=-DWOLFSSL_RISCV_ASM
592-
MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-sha256.o \
593-
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-sha512.o \
594-
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-sha3.o \
595-
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-aes.o
592+
WOLFCRYPT_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-sha256.o \
593+
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-sha512.o \
594+
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-sha3.o \
595+
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/riscv/riscv-64-aes.o
596596
endif
597597
endif
598598

include/encrypt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef ENCRYPT_H_INCLUDED
2525
#define ENCRYPT_H_INCLUDED
2626

27-
#if defined(__WOLFBOOT) || defined(UNIT_TEST)
27+
#if defined(__WOLFBOOT) || defined(UNIT_TEST) || defined(MMU)
2828

2929
#include <stdint.h>
3030
#include "wolfssl/wolfcrypt/settings.h"
@@ -89,5 +89,5 @@ int wolfBoot_enable_fallback_iv(int enable);
8989
void wolfBoot_crypto_set_iv(const uint8_t *nonce, uint32_t iv_counter);
9090
#endif
9191

92-
#endif /* __WOLFBOOT || UNIT_TEST */
92+
#endif /* __WOLFBOOT || UNIT_TEST || MMU */
9393
#endif /* ENCRYPT_H_INCLUDED */

options.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ ifeq ($(SIGN),ML_DSA)
409409
KEYGEN_OPTIONS+=--ml_dsa
410410
SIGN_OPTIONS+=--ml_dsa
411411
WOLFCRYPT_OBJS+= $(ML_DSA_OBJS)
412-
WOLFCRYPT_OBJS+=$(MATH_OBJS)
413412
CFLAGS+=-D"WOLFBOOT_SIGN_ML_DSA" $(ML_DSA_EXTRA)
414413
ifneq ($(HASH),SHA3)
415414
WOLFCRYPT_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sha3.o

src/libwolfboot.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,12 @@ int wolfBoot_initialize_encryption(void)
116116
#endif /* EXT_FLASH && EXT_ENCRYPTED */
117117

118118
#if !defined(__WOLFBOOT) && !defined(UNIT_TEST)
119-
#define XMEMSET memset
120-
#define XMEMCPY memcpy
121-
#define XMEMCMP memcmp
119+
/* Avoid redefining if already defined by wolfSSL headers */
120+
#if !defined(XMEMSET)
121+
#define XMEMSET memset
122+
#define XMEMCPY memcpy
123+
#define XMEMCMP memcmp
124+
#endif
122125
#endif
123126

124127
#ifndef NULL

0 commit comments

Comments
 (0)