From f59d958e0b2f169b549e5cdc293a70bc6873cd45 Mon Sep 17 00:00:00 2001 From: khalidjmi1200 <51022885+khalidjmi1200@users.noreply.github.com> Date: Tue, 10 Sep 2019 15:13:31 +0900 Subject: [PATCH] Work around for cppcheck warning. cppcheck warning: Redundant assignment of 'fh' to itself. --- src/spiffs_nucleus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spiffs_nucleus.h b/src/spiffs_nucleus.h index b6165c2..3af548b 100644 --- a/src/spiffs_nucleus.h +++ b/src/spiffs_nucleus.h @@ -262,8 +262,8 @@ #define SPIFFS_FH_OFFS(fs, fh) ((fh) != 0 ? ((fh) + (fs)->cfg.fh_ix_offset) : 0) #define SPIFFS_FH_UNOFFS(fs, fh) ((fh) != 0 ? ((fh) - (fs)->cfg.fh_ix_offset) : 0) #else -#define SPIFFS_FH_OFFS(fs, fh) (fh) -#define SPIFFS_FH_UNOFFS(fs, fh) (fh) +#define SPIFFS_FH_OFFS(fs, fh) ((spiffs_file)(fh)) +#define SPIFFS_FH_UNOFFS(fs, fh) ((spiffs_file)(fh)) #endif