From 8b3d9996ede064206d4c4ca8cbbf8ef882a05842 Mon Sep 17 00:00:00 2001 From: philip Date: Thu, 29 Sep 2016 22:56:18 -0400 Subject: [PATCH] Fix the casting ... --- src/spiffs_gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spiffs_gc.c b/src/spiffs_gc.c index 053db26..3b5f305 100644 --- a/src/spiffs_gc.c +++ b/src/spiffs_gc.c @@ -255,7 +255,7 @@ s32_t spiffs_gc_find_candidate( s32_t *cand_scores = (s32_t *)(fs->work + max_candidates * sizeof(spiffs_block_ix)); // align cand_scores on s32_t boundary - cand_scores = (s32_t*)(((ptrdiff_t)cand_scores + sizeof(ptrdiff_t) - 1) & ~(sizeof(ptrdiff_t) - 1)); + cand_scores = (s32_t*)(((intptr_t)cand_scores + sizeof(intptr_t) - 1) & ~(sizeof(intptr_t) - 1)); *block_candidates = cand_blocks;