From 26649c5a6f1fd3f912eea80c939e04a7eef5fa23 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 22 Jun 2015 14:03:06 +0200 Subject: [PATCH] silence warning about signed/unsigned comparision when spiffs_obj_id is 32 bit SPIFFS_OBJ_ID_IX_FLAG should be the same type as spiffs_obj_id, but defaults to int --- 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 5d905fe..2a7074b 100644 --- a/src/spiffs_nucleus.h +++ b/src/spiffs_nucleus.h @@ -124,7 +124,7 @@ #define SPIFFS_EV_IX_NEW 1 #define SPIFFS_EV_IX_DEL 2 -#define SPIFFS_OBJ_ID_IX_FLAG (1<<(8*sizeof(spiffs_obj_id)-1)) +#define SPIFFS_OBJ_ID_IX_FLAG ((spiffs_obj_id)(1<<(8*sizeof(spiffs_obj_id)-1))) #define SPIFFS_UNDEFINED_LEN (u32_t)(-1)