diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index 06d2264e6d..405dbcbf9f 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -1135,7 +1135,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev, break; case TCFLSH: { - int queue = (int)args; + int queue = (int)(rt_ubase_t)args; _tc_flush(serial, queue); } diff --git a/components/libc/posix/io/termios/termios.c b/components/libc/posix/io/termios/termios.c index 84061079d9..ece9081d9d 100644 --- a/components/libc/posix/io/termios/termios.c +++ b/components/libc/posix/io/termios/termios.c @@ -13,6 +13,7 @@ #include #include #include "termios.h" +#include int tcgetattr(int fd, struct termios *tio) { @@ -95,12 +96,12 @@ int tcsendbreak(int fd, int dur) int tcflush(int fd, int queue) { - return ioctl(fd, TCFLSH, (void*)queue); + return ioctl(fd, TCFLSH, (void*)(rt_ubase_t)queue); } int tcflow(int fd, int action) { - return ioctl(fd, TCXONC, (void*)action); + return ioctl(fd, TCXONC, (void*)(rt_ubase_t)action); } /** diff --git a/libcpu/aarch64/common/mmu.c b/libcpu/aarch64/common/mmu.c index cac70d2767..0197e23f0f 100644 --- a/libcpu/aarch64/common/mmu.c +++ b/libcpu/aarch64/common/mmu.c @@ -564,6 +564,7 @@ int rt_hw_mmu_ioremap_init(rt_mmu_info *mmu_info, void *v_address, size_t size) return 0; } +#ifdef RT_USING_SMART static size_t find_vaddr(rt_mmu_info *mmu_info, int pages) { size_t loop_pages; @@ -607,7 +608,6 @@ static size_t find_vaddr(rt_mmu_info *mmu_info, int pages) return 0; } -#ifdef RT_USING_SMART static int check_vaddr(rt_mmu_info *mmu_info, void *va, int pages) { size_t loop_va;