From 181fe7530a6b45568167a0d539f6806c62338165 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 7 Jul 2024 11:48:46 -0400 Subject: Fix most of the (extensive) red in ea80d1cc9ca Change-Id: Ie494df80caa222423a52977031920d54bd058c3c --- firmware/target/mips/ingenic_x1000/sd-x1000.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/target/mips/ingenic_x1000/sd-x1000.c') diff --git a/firmware/target/mips/ingenic_x1000/sd-x1000.c b/firmware/target/mips/ingenic_x1000/sd-x1000.c index 679a25a222..4312937ee8 100644 --- a/firmware/target/mips/ingenic_x1000/sd-x1000.c +++ b/firmware/target/mips/ingenic_x1000/sd-x1000.c @@ -187,6 +187,9 @@ long sd_last_disk_activity(void) bool sd_present(IF_MD_NONVOID(int drive)) { +#ifndef HAVE_MULTIDRIVE + int drive = 0; +#endif /* Seems that volume_properties() in firmware/common/disk.c may pass * drive = -1 when the SD card is not inserted, so just return false. */ @@ -198,6 +201,10 @@ bool sd_present(IF_MD_NONVOID(int drive)) bool sd_removable(IF_MD_NONVOID(int drive)) { +#ifndef HAVE_MULTIDRIVE + int drive = 0; +#endif + /* Same reason as sd_present() */ if(drive < 0) return false; -- cgit v1.2.3