diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index cbb81e94cb4..4d053060d7e 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -1395,7 +1395,8 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { case TCGETS: { - FAR struct termios *termiosp = (FAR struct termios *)arg; + FAR struct termios *termiosp = (FAR struct termios *) + (uintptr_t)arg; if (!termiosp) { @@ -1415,7 +1416,8 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case TCSETS: { - FAR struct termios *termiosp = (FAR struct termios *)arg; + FAR struct termios *termiosp = (FAR struct termios *) + (uintptr_t)arg; if (!termiosp) {