From 3b142f45ced74fbb671d2e2073c03bfcbfac6376 Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Thu, 1 Oct 2026 16:40:13 +0200 Subject: [PATCH] rk27xx: fix a -Wundef warning in simulator builds config.h defines HAVE_STORAGE_FLUSH for the rk27xx Scheme A FTL when CONFIG_STORAGE has STORAGE_NAND and CONFIG_NAND is NAND_RK27XX. sim.h undefines CONFIG_NAND but keeps CONFIG_STORAGE, so a simulator for a NAND target - the iPod nano 2G - evaluated the undefined macro: "CONFIG_NAND" is not defined, evaluates to 0 [-Wundef] Test that it is defined first. Co-Authored-By: Claude Opus 5.5 Change-Id: Id1e328f08c14d7c5528d29f110fdbb8be68ab2f5 --- firmware/export/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/export/config.h b/firmware/export/config.h index 786ca1e3a8..7a206afb32 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -902,7 +902,8 @@ Lyre prototype 1 */ * pages in RAM (ftl-scheme-a.c) until a later write completes them; * storage_flush() commits them at shutdown, ROLO and wherever else it is * called. */ -#if (CONFIG_STORAGE & STORAGE_NAND) && (CONFIG_NAND == NAND_RK27XX) \ +#if (CONFIG_STORAGE & STORAGE_NAND) && defined(CONFIG_NAND) \ + && (CONFIG_NAND == NAND_RK27XX) \ && (CONFIG_RK27XX_FTL == RK27XX_FTL_SCHEME_A) \ && !defined(HAVE_STORAGE_FLUSH) #define HAVE_STORAGE_FLUSH