ntdll: Remove unused variables.

This commit is contained in:
Andrew Talbot 2008-04-22 22:05:03 +01:00 committed by Alexandre Julliard
parent ba742868e5
commit 664349eacc
3 changed files with 3 additions and 13 deletions

View File

@ -815,7 +815,6 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
{ {
NTSTATUS ret = STATUS_NOT_SUPPORTED; NTSTATUS ret = STATUS_NOT_SUPPORTED;
#ifdef linux #ifdef linux
unsigned size;
SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data; SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data;
int io; int io;
struct cdrom_subchnl sc; struct cdrom_subchnl sc;
@ -860,7 +859,6 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
switch (fmt->Format) switch (fmt->Format)
{ {
case IOCTL_CDROM_CURRENT_POSITION: case IOCTL_CDROM_CURRENT_POSITION:
size = sizeof(SUB_Q_CURRENT_POSITION);
RtlEnterCriticalSection( &cache_section ); RtlEnterCriticalSection( &cache_section );
if (hdr->AudioStatus==AUDIO_STATUS_IN_PROGRESS) { if (hdr->AudioStatus==AUDIO_STATUS_IN_PROGRESS) {
data->CurrentPosition.FormatCode = IOCTL_CDROM_CURRENT_POSITION; data->CurrentPosition.FormatCode = IOCTL_CDROM_CURRENT_POSITION;
@ -889,7 +887,6 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
RtlLeaveCriticalSection( &cache_section ); RtlLeaveCriticalSection( &cache_section );
break; break;
case IOCTL_CDROM_MEDIA_CATALOG: case IOCTL_CDROM_MEDIA_CATALOG:
size = sizeof(SUB_Q_MEDIA_CATALOG_NUMBER);
data->MediaCatalog.FormatCode = IOCTL_CDROM_MEDIA_CATALOG; data->MediaCatalog.FormatCode = IOCTL_CDROM_MEDIA_CATALOG;
{ {
struct cdrom_mcn mcn; struct cdrom_mcn mcn;
@ -902,7 +899,6 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
} }
break; break;
case IOCTL_CDROM_TRACK_ISRC: case IOCTL_CDROM_TRACK_ISRC:
size = sizeof(SUB_Q_CURRENT_POSITION);
FIXME("TrackIsrc: NIY on linux\n"); FIXME("TrackIsrc: NIY on linux\n");
data->TrackIsrc.FormatCode = IOCTL_CDROM_TRACK_ISRC; data->TrackIsrc.FormatCode = IOCTL_CDROM_TRACK_ISRC;
data->TrackIsrc.Tcval = 0; data->TrackIsrc.Tcval = 0;
@ -913,7 +909,6 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
end: end:
ret = CDROM_GetStatusCode(io); ret = CDROM_GetStatusCode(io);
#elif defined(__FreeBSD__) || defined(__NetBSD__) #elif defined(__FreeBSD__) || defined(__NetBSD__)
unsigned size;
SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data; SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data;
int io; int io;
struct ioc_read_subchannel read_sc; struct ioc_read_subchannel read_sc;
@ -974,7 +969,6 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
switch (fmt->Format) switch (fmt->Format)
{ {
case IOCTL_CDROM_CURRENT_POSITION: case IOCTL_CDROM_CURRENT_POSITION:
size = sizeof(SUB_Q_CURRENT_POSITION);
RtlEnterCriticalSection( &cache_section ); RtlEnterCriticalSection( &cache_section );
if (hdr->AudioStatus==AUDIO_STATUS_IN_PROGRESS) { if (hdr->AudioStatus==AUDIO_STATUS_IN_PROGRESS) {
data->CurrentPosition.FormatCode = IOCTL_CDROM_CURRENT_POSITION; data->CurrentPosition.FormatCode = IOCTL_CDROM_CURRENT_POSITION;
@ -1000,13 +994,11 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
RtlLeaveCriticalSection( &cache_section ); RtlLeaveCriticalSection( &cache_section );
break; break;
case IOCTL_CDROM_MEDIA_CATALOG: case IOCTL_CDROM_MEDIA_CATALOG:
size = sizeof(SUB_Q_MEDIA_CATALOG_NUMBER);
data->MediaCatalog.FormatCode = IOCTL_CDROM_MEDIA_CATALOG; data->MediaCatalog.FormatCode = IOCTL_CDROM_MEDIA_CATALOG;
data->MediaCatalog.Mcval = sc.what.media_catalog.mc_valid; data->MediaCatalog.Mcval = sc.what.media_catalog.mc_valid;
memcpy(data->MediaCatalog.MediaCatalog, sc.what.media_catalog.mc_number, 15); memcpy(data->MediaCatalog.MediaCatalog, sc.what.media_catalog.mc_number, 15);
break; break;
case IOCTL_CDROM_TRACK_ISRC: case IOCTL_CDROM_TRACK_ISRC:
size = sizeof(SUB_Q_CURRENT_POSITION);
data->TrackIsrc.FormatCode = IOCTL_CDROM_TRACK_ISRC; data->TrackIsrc.FormatCode = IOCTL_CDROM_TRACK_ISRC;
data->TrackIsrc.Tcval = sc.what.track_info.ti_valid; data->TrackIsrc.Tcval = sc.what.track_info.ti_valid;
memcpy(data->TrackIsrc.TrackIsrc, sc.what.track_info.ti_number, 15); memcpy(data->TrackIsrc.TrackIsrc, sc.what.track_info.ti_number, 15);

View File

@ -376,12 +376,11 @@ static enum loadorder get_registry_value( HANDLE hkey, const WCHAR *module )
UNICODE_STRING valueW; UNICODE_STRING valueW;
char buffer[80]; char buffer[80];
DWORD count; DWORD count;
BOOL ret;
RtlInitUnicodeString( &valueW, module ); RtlInitUnicodeString( &valueW, module );
if ((ret = !NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, if (!NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation,
buffer, sizeof(buffer), &count ))) buffer, sizeof(buffer), &count ))
{ {
WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)buffer)->Data; WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)buffer)->Data;
return parse_load_order( str ); return parse_load_order( str );

View File

@ -596,7 +596,6 @@ static const WCHAR *skip_unc_prefix( const WCHAR *ptr )
static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size) static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
{ {
ULONG reqsize = 0, mark = 0, dep = 0, deplen; ULONG reqsize = 0, mark = 0, dep = 0, deplen;
DOS_PATHNAME_TYPE type;
LPWSTR ins_str = NULL; LPWSTR ins_str = NULL;
LPCWSTR ptr; LPCWSTR ptr;
const UNICODE_STRING* cd; const UNICODE_STRING* cd;
@ -613,7 +612,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
else else
cd = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectory.DosPath; cd = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectory.DosPath;
switch (type = RtlDetermineDosPathNameType_U(name)) switch (RtlDetermineDosPathNameType_U(name))
{ {
case UNC_PATH: /* \\foo */ case UNC_PATH: /* \\foo */
ptr = skip_unc_prefix( name ); ptr = skip_unc_prefix( name );