mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
serial: Fix a warning if termios enabled
Fix:
```
serial/serial.c: In function 'uart_ioctl':
Error: serial/serial.c:1397:46: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
1397 | FAR struct termios *termiosp = (FAR struct termios *)arg;
| ^
Error: serial/serial.c:1419:46: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
1419 | FAR struct termios *termiosp = (FAR struct termios *)arg;
|
```
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user