From 4d36fde5d4837b5ea132c55f04af306ee3d60e13 Mon Sep 17 00:00:00 2001 From: reiyawea Date: Sun, 23 Aug 2020 21:09:55 +0800 Subject: [PATCH] Update spiffs_nucleus.h Compiler warns "integer operation result is out of range" when spiffs_obj_id is typedef'ed to 32 bit. Rewrite 1 as 1UL solves the problem. --- src/spiffs_nucleus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spiffs_nucleus.h b/src/spiffs_nucleus.h index 3af548b..6819136 100644 --- a/src/spiffs_nucleus.h +++ b/src/spiffs_nucleus.h @@ -134,7 +134,7 @@ // updating an object index header data only, not the table itself #define SPIFFS_EV_IX_UPD_HDR (4) -#define SPIFFS_OBJ_ID_IX_FLAG ((spiffs_obj_id)(1<<(8*sizeof(spiffs_obj_id)-1))) +#define SPIFFS_OBJ_ID_IX_FLAG ((spiffs_obj_id)(1UL<<(8*sizeof(spiffs_obj_id)-1))) #define SPIFFS_UNDEFINED_LEN (u32_t)(-1)