From a8286e7458c260e9dfc00890dc491f678d819021 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Thu, 4 Aug 2016 23:46:26 +0100 Subject: [PATCH] cdvdgigaherz: Remove unused variables --- plugins/cdvdGigaherz/src/PlainIso.cpp | 6 ------ plugins/cdvdGigaherz/src/ReadThread.cpp | 2 -- plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp | 9 ++------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/plugins/cdvdGigaherz/src/PlainIso.cpp b/plugins/cdvdGigaherz/src/PlainIso.cpp index 72554237e3..f4f4b8e4a5 100644 --- a/plugins/cdvdGigaherz/src/PlainIso.cpp +++ b/plugins/cdvdGigaherz/src/PlainIso.cpp @@ -65,8 +65,6 @@ PlainIso::~PlainIso() s32 PlainIso::GetSectorCount() { - int plain_sectors = 0; - if(discSizeCached) return discSize; @@ -116,8 +114,6 @@ s32 PlainIso::GetMediaType() s32 PlainIso::ReadTOC(char *toc,int msize) { - DWORD size=0; - if(GetMediaType()>=0) return -1; @@ -192,8 +188,6 @@ s32 PlainIso::ReadSectors2352(u32 sector, u32 count, char *buffer) s32 PlainIso::DiscChanged() { - DWORD size=0; - if(!OpenOK) return -1; return 0; diff --git a/plugins/cdvdGigaherz/src/ReadThread.cpp b/plugins/cdvdGigaherz/src/ReadThread.cpp index 1f686b3b55..c16831a90d 100644 --- a/plugins/cdvdGigaherz/src/ReadThread.cpp +++ b/plugins/cdvdGigaherz/src/ReadThread.cpp @@ -170,8 +170,6 @@ DWORD CALLBACK cdvdThread(PVOID param) while(cdvd_is_open) { - DWORD f=0; - if(!src) break; if(cdvdUpdateDiscStatus()) diff --git a/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp b/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp index 97db166d2c..396c1aaf22 100644 --- a/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp +++ b/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp @@ -351,7 +351,6 @@ s32 IOCtlSrc::GetSectorCount() DWORD size; LARGE_INTEGER li; - int plain_sectors = 0; if(discSizeCached) return discSize; @@ -434,7 +433,6 @@ s32 IOCtlSrc::GetSectorCount() s32 IOCtlSrc::GetLayerBreakAddress() { DWORD size; - DWORD code; if(GetMediaType()<0) return -1; @@ -446,7 +444,7 @@ s32 IOCtlSrc::GetLayerBreakAddress() dvdrs.Format=DvdPhysicalDescriptor; dvdrs.SessionId=sessID; dvdrs.LayerNumber=0; - if(code=DeviceIoControl(device,IOCTL_DVD_READ_STRUCTURE,&dvdrs,sizeof(dvdrs),&dld, sizeof(dld), &size, NULL)!=0) + if (DeviceIoControl(device, IOCTL_DVD_READ_STRUCTURE, &dvdrs, sizeof(dvdrs), &dld, sizeof(dld), &size, nullptr)) { if (dld.ld.NumberOfLayers == 0) // Single layer { @@ -517,7 +515,6 @@ void IOCtlSrc::SetSpindleSpeed(bool restore_defaults) { s32 IOCtlSrc::GetMediaType() { DWORD size; - DWORD code; if(mediaTypeCached) return mediaType; @@ -540,7 +537,7 @@ s32 IOCtlSrc::GetMediaType() dvdrs.Format=DvdPhysicalDescriptor; dvdrs.SessionId=sessID; dvdrs.LayerNumber=0; - if(code=DeviceIoControl(device,IOCTL_DVD_READ_STRUCTURE,&dvdrs,sizeof(dvdrs),&dld, sizeof(dld), &size, NULL)!=0) + if (DeviceIoControl(device, IOCTL_DVD_READ_STRUCTURE, &dvdrs, sizeof(dvdrs), &dld, sizeof(dld), &size, nullptr)) { if (dld.ld.NumberOfLayers == 0) // Single layer { @@ -579,8 +576,6 @@ s32 IOCtlSrc::ReadTOC(char *toc,int msize) tocrq.Msf=1; tocrq.SessionTrack=1; - CDROM_TOC_FULL_TOC_DATA *ftd=(CDROM_TOC_FULL_TOC_DATA*)tocCacheData; - if(!OpenOK) return -1; int code = DeviceIoControl(device,IOCTL_CDROM_READ_TOC_EX,&tocrq,sizeof(tocrq),tocCacheData, 2048, &size, NULL);