shithub: libdvdcss

Download patch

ref: 2ec45471143b43ef20888682d809577c390edb62
parent: 3dc40990ab9c9da2e9ed728d540c312b78d8a6bc
author: Jean-Baptiste Kempf <jb@videolan.org>
date: Sun Mar 17 11:38:53 EDT 2013

Restore C89 compatibility

--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -922,12 +922,13 @@
         DWORD tmp;
         uint8_t buffer[DVD_ASF_LENGTH] = { 0 };
         PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer;
+        PDVD_ASF keyData;
 
         key->KeyLength  = DVD_ASF_LENGTH;
         key->KeyType    = DvdAsf;
         key->KeyFlags   = 0;
 
-        PDVD_ASF keyData = (PDVD_ASF)key->KeyData;
+        keyData = (PDVD_ASF)key->KeyData;
         keyData->SuccessFlag = *pi_asf;
 
         i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_READ_KEY, key,
@@ -1569,6 +1570,7 @@
         DWORD tmp;
         uint8_t buffer[DVD_RPC_KEY_LENGTH] = { 0 };
         PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer;
+        PDVD_RPC_KEY keyData;
 
         key->KeyLength  = DVD_RPC_KEY_LENGTH;
         key->KeyType    = DvdGetRpcKey;
@@ -1582,7 +1584,7 @@
             return i_ret;
         }
 
-        PDVD_RPC_KEY keyData = (PDVD_RPC_KEY)key->KeyData;
+        keyData = (PDVD_RPC_KEY)key->KeyData;
         *p_type = keyData->TypeCode;
         *p_mask = keyData->RegionMask;
         *p_scheme = keyData->RpcScheme;