fix: Fix compile warnings on qemu-vexpress-a9 platform (-Wimplicit-function-declaration)

This commit is contained in:
recan-li 2021-12-04 01:03:26 +08:00
parent 4ab6f47517
commit cf92ae747f
3 changed files with 8 additions and 6 deletions

View File

@ -13,6 +13,7 @@
#include <netif/ethernetif.h> #include <netif/ethernetif.h>
#include <lwipopts.h> #include <lwipopts.h>
#include <automac.h> #include <automac.h>
#include "delay.h"
#define MAX_ADDR_LEN 6 #define MAX_ADDR_LEN 6
#define SMC911X_EMAC_DEVICE(eth) (struct eth_device_smc911x*)(eth) #define SMC911X_EMAC_DEVICE(eth) (struct eth_device_smc911x*)(eth)

View File

@ -295,11 +295,11 @@ help:
rt_kprintf(" eraseall <name> Erase all block on device <name>\n"); rt_kprintf(" eraseall <name> Erase all block on device <name>\n");
return ; return ;
} }
else if (!strcmp(argv[1], "id")) else if (!rt_strcmp(argv[1], "id"))
{ {
mtd_nandid(argv[2]); mtd_nandid(argv[2]);
} }
else if (!strcmp(argv[1], "read")) else if (!rt_strcmp(argv[1], "read"))
{ {
if (argc < 5) if (argc < 5)
{ {
@ -308,7 +308,7 @@ help:
} }
mtd_nand_read(argv[2], atoi(argv[3]), atoi(argv[4])); 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) if (argc < 5)
{ {
@ -317,7 +317,7 @@ help:
} }
mtd_nand_readoob(argv[2], atoi(argv[3]), atoi(argv[4])); 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) if (argc < 5)
{ {
@ -326,7 +326,7 @@ help:
} }
mtd_nand_write(argv[2], atoi(argv[3]), atoi(argv[4])); 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) if (argc < 4)
{ {
@ -335,7 +335,7 @@ help:
} }
mtd_nand_erase(argv[2], atoi(argv[3])); 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]); mtd_nand_erase_all(argv[2]);
} }

View File

@ -16,6 +16,7 @@
#include <dfs_posix.h> #include <dfs_posix.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h>
typedef long suseconds_t; /* microseconds (signed) */ typedef long suseconds_t; /* microseconds (signed) */
typedef uint32_t id_t; /* may contain pid, uid or gid */ typedef uint32_t id_t; /* may contain pid, uid or gid */