Jean-Baptiste Kempf
2013-03-12 12:28:31 UTC
warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
---
src/ioctl.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/ioctl.c b/src/ioctl.c
index 61a924e..7e3568e 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -927,7 +927,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf )
key->KeyType = DvdAsf;
key->KeyFlags = 0;
- ((PDVD_ASF)key->KeyData)->SuccessFlag = *pi_asf;
+ PDVD_ASF keyData = (PDVD_ASF)key->KeyData;
+ keyData->SuccessFlag = *pi_asf;
i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_READ_KEY, key,
key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1;
@@ -937,7 +938,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf )
return i_ret;
}
- *pi_asf = ((PDVD_ASF)key->KeyData)->SuccessFlag;
+ keyData = (PDVD_ASF)key->KeyData;
+ *pi_asf = keyData->SuccessFlag;
}
else
{
@@ -1580,9 +1582,10 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
return i_ret;
}
- *p_type = ((PDVD_RPC_KEY)key->KeyData)->TypeCode;
- *p_mask = ((PDVD_RPC_KEY)key->KeyData)->RegionMask;
- *p_scheme = ((PDVD_RPC_KEY)key->KeyData)->RpcScheme;
+ PDVD_RPC_KEY keyData = (PDVD_RPC_KEY)key->KeyData;
+ *p_type = keyData->TypeCode;
+ *p_mask = keyData->RegionMask;
+ *p_scheme = keyData->RpcScheme;
}
else
{
---
src/ioctl.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/ioctl.c b/src/ioctl.c
index 61a924e..7e3568e 100644
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -927,7 +927,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf )
key->KeyType = DvdAsf;
key->KeyFlags = 0;
- ((PDVD_ASF)key->KeyData)->SuccessFlag = *pi_asf;
+ PDVD_ASF keyData = (PDVD_ASF)key->KeyData;
+ keyData->SuccessFlag = *pi_asf;
i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_READ_KEY, key,
key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1;
@@ -937,7 +938,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf )
return i_ret;
}
- *pi_asf = ((PDVD_ASF)key->KeyData)->SuccessFlag;
+ keyData = (PDVD_ASF)key->KeyData;
+ *pi_asf = keyData->SuccessFlag;
}
else
{
@@ -1580,9 +1582,10 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
return i_ret;
}
- *p_type = ((PDVD_RPC_KEY)key->KeyData)->TypeCode;
- *p_mask = ((PDVD_RPC_KEY)key->KeyData)->RegionMask;
- *p_scheme = ((PDVD_RPC_KEY)key->KeyData)->RpcScheme;
+ PDVD_RPC_KEY keyData = (PDVD_RPC_KEY)key->KeyData;
+ *p_type = keyData->TypeCode;
+ *p_mask = keyData->RegionMask;
+ *p_scheme = keyData->RpcScheme;
}
else
{
--
1.8.1.5
1.8.1.5