Skip to content

Commit d57b7cb

Browse files
authored
修复编译过程中的 DFS_V2报错、FAL警告
1 parent 9957784 commit d57b7cb

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

components/dfs/dfs_v2/src/dfs_pcache.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@
1616
#include <dfs_pcache.h>
1717
#include <dfs_dentry.h>
1818
#include <dfs_mnt.h>
19-
#include <mm_page.h>
20-
#include <mm_private.h>
21-
#include <mmu.h>
22-
#include <tlb.h>
2319

2420
#include <rthw.h>
2521

2622
#ifdef RT_USING_PAGECACHE
2723

24+
#include <mm_page.h>
25+
#include <mm_private.h>
26+
#include <mmu.h>
27+
#include <tlb.h>
28+
2829
#ifndef RT_PAGECACHE_COUNT
2930
#define RT_PAGECACHE_COUNT 4096
3031
#endif

components/drivers/core/device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#include <rtdevice.h> /* for wqueue_init */
3232
#endif /* RT_USING_POSIX_DEVIO */
3333

34-
#ifdef RT_USING_DFS_V2
34+
#if defined (RT_USING_DFS_V2) && defined (RT_USING_DFS_DEVFS)
3535
#include <devfs.h>
36-
#endif /* RT_USING_DFS_V2 */
36+
#endif /* RT_USING_DFS_V2 RT_USING_DFS_DEVFS */
3737

3838
#ifdef RT_USING_DEVICE
3939

@@ -84,7 +84,7 @@ rt_err_t rt_device_register(rt_device_t dev,
8484
rt_wqueue_init(&(dev->wait_queue));
8585
#endif /* RT_USING_POSIX_DEVIO */
8686

87-
#ifdef RT_USING_DFS_V2
87+
#if defined (RT_USING_DFS_V2) && defined (RT_USING_DFS_DEVFS)
8888
dfs_devfs_device_add(dev);
8989
#endif /* RT_USING_DFS_V2 */
9090

components/fal/src/fal_rtt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
*/
1111

1212
#include <fal.h>
13+
#include <string.h>
14+
#include <stdlib.h>
1315
#include <rtdevice.h>
1416

1517
#define DBG_TAG "FAL"
@@ -50,7 +52,7 @@ static rt_err_t blk_dev_control(rt_device_t dev, rt_uint8_t cmd, void *args)
5052
return -RT_ERROR;
5153
}
5254

53-
memcpy(geometry, &part->geometry, sizeof(struct rt_device_blk_geometry));
55+
rt_memcpy(geometry, &part->geometry, sizeof(struct rt_device_blk_geometry));
5456
}
5557
else if (cmd == RT_DEVICE_CTRL_BLK_ERASE)
5658
{

0 commit comments

Comments
 (0)