rfs: cast minor to uintptr_t to truncate explicitly

This commit is contained in:
Gedare Bloom
2015-03-16 12:14:15 -04:00
parent 71260b4a09
commit b4d1f0899b

View File

@@ -30,7 +30,7 @@ rtems_rfs_rtems_device_get_major_and_minor ( const rtems_libio_t *iop,
rtems_device_minor_number *minor) rtems_device_minor_number *minor)
{ {
*major = iop->data0; *major = iop->data0;
*minor = (rtems_device_minor_number) iop->data1; *minor = (rtems_device_minor_number) (uintptr_t) iop->data1;
} }
/** /**
@@ -77,7 +77,7 @@ rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
rtems_rfs_rtems_unlock (fs); rtems_rfs_rtems_unlock (fs);
iop->data0 = major; iop->data0 = major;
iop->data1 = (void *) minor; iop->data1 = (void *) (uintptr_t) minor;
return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major); return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major);
} }