From 1f37de29c4ee4dac488aa9c4f8f0990263f94c1a Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Thu, 13 Dec 2018 14:54:26 +0800 Subject: Fix the value width issue under 32/64 bit arch. --- components/dfs/src/dfs_file.c | 2 +- components/dfs/src/poll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'components/dfs') diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index 646ae58e36..e7071522ce 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -171,7 +171,7 @@ int dfs_file_ioctl(struct dfs_fd *fd, int cmd, void *args) return fd->flags; /* return flags */ case F_SETFL: { - int flags = (int)args; + int flags = (int)(rt_base_t)args; int mask = O_NONBLOCK | O_APPEND; flags &= mask; diff --git a/components/dfs/src/poll.c b/components/dfs/src/poll.c index 6655a8a667..6f83762082 100644 --- a/components/dfs/src/poll.c +++ b/components/dfs/src/poll.c @@ -40,7 +40,7 @@ static int __wqueue_pollwake(struct rt_wqueue_node *wait, void *key) { struct rt_poll_node *pn; - if (key && !((rt_uint32_t)key & wait->key)) + if (key && !((rt_ubase_t)key & wait->key)) return -1; pn = rt_container_of(wait, struct rt_poll_node, wqn); -- cgit v1.3.1