summaryrefslogtreecommitdiff
path: root/components/fal/src
diff options
context:
space:
mode:
authordongly <[email protected]>2022-08-03 00:09:49 +0800
committerGitHub <[email protected]>2022-08-02 12:09:49 -0400
commit3363586cbbf507937a6be74397f4ffd5c6966fe5 (patch)
tree8eaac87aa11b72c93a96b128d5a15134f097e95d /components/fal/src
parent7882e42c614c24a1750cba4a3e2936b6bf68f42f (diff)
Fix some compilation warning (#5744)
* Fix some compilation warning * 补充修正一些数据类型的使用错误 Co-authored-by: Meco Man <[email protected]>
Diffstat (limited to 'components/fal/src')
-rw-r--r--components/fal/src/fal_rtt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/fal/src/fal_rtt.c b/components/fal/src/fal_rtt.c
index 3a014525b2..52d276d8c9 100644
--- a/components/fal/src/fal_rtt.c
+++ b/components/fal/src/fal_rtt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -264,7 +264,7 @@ static rt_err_t mtd_nor_dev_erase(struct rt_mtd_nor_device* device, rt_off_t off
ret = fal_partition_erase(part->fal_part, offset, length);
- if (ret != length)
+ if ((rt_uint32_t)ret != length || ret < 0)
{
return -RT_ERROR;
}
@@ -556,7 +556,7 @@ static void fal(uint8_t argc, char **argv) {
#define CMD_ERASE_INDEX 3
#define CMD_BENCH_INDEX 4
- int result;
+ int result = 0;
static const struct fal_flash_dev *flash_dev = NULL;
static const struct fal_partition *part_dev = NULL;
size_t i = 0, j = 0;