From 922b52642618806bd8a06141d91c51e8409c9ab3 Mon Sep 17 00:00:00 2001 From: Tobias Gruen Date: Wed, 14 Feb 2024 01:45:39 +0100 Subject: [PATCH] Fix missing initialization of xError in FF_Move The error variable could get accessed before initialization. --- ff_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ff_file.c b/ff_file.c index 5d09746..87bb31e 100644 --- a/ff_file.c +++ b/ff_file.c @@ -887,7 +887,7 @@ static FF_FILE * prvAllocFileHandle( FF_IOManager_t * pxIOManager, #endif /* *INDENT-ON* */ { - FF_Error_t xError; + FF_Error_t xError = FF_ERR_NONE; FF_FILE * pSrcFile, * pxDestFile; FF_DirEnt_t xMyFile; uint8_t ucEntryBuffer[ 32 ];