From 9ac8786bb2ff71ca2ddc59c3b9757e586c258231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Trnk=C3=B3ci?= Date: Tue, 27 Aug 2024 16:04:41 +0200 Subject: [PATCH] fs: nvs: fix nvs static analysis error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is asignment from size_t variable to uint8_t variable in nvs_al_size function that can trigger static analysis error. The problem is fixed by changing the variable to size_t type instead of uint8_t. Signed-off-by: Andrej Trnkóci --- subsys/fs/nvs/nvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/fs/nvs/nvs.c b/subsys/fs/nvs/nvs.c index 5d0a5f5b724..9e6578a5576 100644 --- a/subsys/fs/nvs/nvs.c +++ b/subsys/fs/nvs/nvs.c @@ -88,7 +88,7 @@ static void nvs_lookup_cache_invalidate(struct nvs_fs *fs, uint32_t sector) /* nvs_al_size returns size aligned to fs->write_block_size */ static inline size_t nvs_al_size(struct nvs_fs *fs, size_t len) { - uint8_t write_block_size = fs->flash_parameters->write_block_size; + size_t write_block_size = fs->flash_parameters->write_block_size; if (write_block_size <= 1U) { return len;