From cf92ae747f7a12951bd714c69240903abc867834 Mon Sep 17 00:00:00 2001 From: recan-li <721317716@qq.com> Date: Sat, 4 Dec 2021 01:03:26 +0800 Subject: [PATCH] fix: Fix compile warnings on qemu-vexpress-a9 platform (-Wimplicit-function-declaration) --- bsp/qemu-vexpress-a9/drivers/drv_smc911x.c | 1 + components/drivers/mtd/mtd_nand.c | 12 ++++++------ components/lwp/lwp_syscall.h | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bsp/qemu-vexpress-a9/drivers/drv_smc911x.c b/bsp/qemu-vexpress-a9/drivers/drv_smc911x.c index 9d52b258af..a1f56534c6 100644 --- a/bsp/qemu-vexpress-a9/drivers/drv_smc911x.c +++ b/bsp/qemu-vexpress-a9/drivers/drv_smc911x.c @@ -13,6 +13,7 @@ #include #include #include +#include "delay.h" #define MAX_ADDR_LEN 6 #define SMC911X_EMAC_DEVICE(eth) (struct eth_device_smc911x*)(eth) diff --git a/components/drivers/mtd/mtd_nand.c b/components/drivers/mtd/mtd_nand.c index f516f9b147..4a1e74b76b 100644 --- a/components/drivers/mtd/mtd_nand.c +++ b/components/drivers/mtd/mtd_nand.c @@ -295,11 +295,11 @@ help: rt_kprintf(" eraseall Erase all block on device \n"); return ; } - else if (!strcmp(argv[1], "id")) + else if (!rt_strcmp(argv[1], "id")) { mtd_nandid(argv[2]); } - else if (!strcmp(argv[1], "read")) + else if (!rt_strcmp(argv[1], "read")) { if (argc < 5) { @@ -308,7 +308,7 @@ help: } mtd_nand_read(argv[2], atoi(argv[3]), atoi(argv[4])); } - else if (!strcmp(argv[1], "readoob")) + else if (!rt_strcmp(argv[1], "readoob")) { if (argc < 5) { @@ -317,7 +317,7 @@ help: } mtd_nand_readoob(argv[2], atoi(argv[3]), atoi(argv[4])); } - else if (!strcmp(argv[1], "write")) + else if (!rt_strcmp(argv[1], "write")) { if (argc < 5) { @@ -326,7 +326,7 @@ help: } mtd_nand_write(argv[2], atoi(argv[3]), atoi(argv[4])); } - else if (!strcmp(argv[1], "erase")) + else if (!rt_strcmp(argv[1], "erase")) { if (argc < 4) { @@ -335,7 +335,7 @@ help: } mtd_nand_erase(argv[2], atoi(argv[3])); } - else if (!strcmp(argv[1], "eraseall")) + else if (!rt_strcmp(argv[1], "eraseall")) { mtd_nand_erase_all(argv[2]); } diff --git a/components/lwp/lwp_syscall.h b/components/lwp/lwp_syscall.h index ba1b34a648..02599f4317 100644 --- a/components/lwp/lwp_syscall.h +++ b/components/lwp/lwp_syscall.h @@ -16,6 +16,7 @@ #include #include #include +#include typedef long suseconds_t; /* microseconds (signed) */ typedef uint32_t id_t; /* may contain pid, uid or gid */