* Fix some unused but set variables. Brought to you by gcc 4.6.1.

* Allow warnings for some 3rd party code.

svn path=/trunk/; revision=53676
This commit is contained in:
Amine Khaldi 2011-09-10 21:31:09 +00:00
parent 158c621c68
commit 74634a76e2
44 changed files with 57 additions and 155 deletions

View file

@ -160,7 +160,6 @@ SetDialogIcon(HWND hDlg)
INT_PTR CALLBACK
MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
int idctrl;
LPNMHDR pnmh;
UINT uXIconNew, uYIconNew;
@ -202,7 +201,6 @@ MsConfigWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_NOTIFY:
idctrl = wParam;
pnmh = (LPNMHDR)lParam;
if ((pnmh->hwndFrom == hTabWnd) &&
(pnmh->idFrom == IDC_TAB) &&

View file

@ -77,7 +77,7 @@ StartupPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath)
{
HKEY hKey, hSubKey;
DWORD Index, SubIndex, dwValues, dwSubValues, retVal;
DWORD Index, SubIndex, dwValues, dwSubValues;
DWORD dwValueLength, dwDataLength = MAX_VALUE_NAME;
LV_ITEM item;
TCHAR* Data;
@ -89,7 +89,7 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath)
{
if (RegQueryInfoKey(hKey, NULL, NULL, NULL, &dwValues, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
{
for (Index = 0, retVal = ERROR_SUCCESS; Index < dwValues; Index++)
for (Index = 0; Index < dwValues; Index++)
{
dwValueLength = MAX_KEY_LENGTH;
dwDataLength = MAX_VALUE_NAME;
@ -97,7 +97,7 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath)
if (Data == NULL)
break;
retVal = RegEnumKeyEx(hKey, Index, szValueName, &dwValueLength, NULL, NULL, NULL, NULL);
RegEnumKeyEx(hKey, Index, szValueName, &dwValueLength, NULL, NULL, NULL, NULL);
_stprintf(szSubPath, _T("%s\\%s"), szBasePath, szValueName);
memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_TEXT;

View file

@ -394,8 +394,8 @@ void TConfig::print_vars(char *s) {
}
// See if the group exists
int j, flag;
for(j = 0, flag = 0; j < MAX_INI_GROUPS; j++)
int j;
for(j = 0; j < MAX_INI_GROUPS; j++)
if(!stricmp(ini_groups[j], s)) break;
// If not, print out the value of the variable by that name
if(j == MAX_INI_GROUPS) {

View file

@ -619,8 +619,6 @@ audio_wavein::stop_recording( void )
MMRESULT err;
DWORD wait;
if ( status != WAVEIN_RECORDING )
return;
@ -650,9 +648,7 @@ audio_wavein::stop_recording( void )
if ( data_flushed_event )
wait = WaitForSingleObject(
data_flushed_event, INFINITE
);
WaitForSingleObject(data_flushed_event, INFINITE);
@ -709,7 +705,6 @@ audio_wavein::recording_procedure( LPVOID arg )
MSG msg;
WAVEHDR * phdr;
DWORD wait;
audio_wavein * _this = ( audio_wavein * ) arg;
@ -731,9 +726,7 @@ audio_wavein::recording_procedure( LPVOID arg )
//
if ( _this->wakeup_recthread )
wait = WaitForSingleObject(
_this->wakeup_recthread, INFINITE
);
WaitForSingleObject(_this->wakeup_recthread, INFINITE);
@ -842,9 +835,8 @@ audio_wavein::recording_procedure( LPVOID arg )
// recording thread can go to sleep!
//
wait = WaitForSingleObject(
_this->wakeup_recthread, INFINITE );
WaitForSingleObject(_this->wakeup_recthread, INFINITE);
}

View file

@ -460,8 +460,6 @@ audio_waveout::play( void )
MMRESULT err;
unsigned int i;
BOOL ev;
if ( !main_buffer )
{ return; } //TODO; throw error, or assert
@ -495,7 +493,7 @@ audio_waveout::play( void )
// Wakeup playing thread.
//
ev = SetEvent( wakeup_playthread );
SetEvent( wakeup_playthread );
return;
@ -553,7 +551,7 @@ audio_waveout::play( void )
// Wakeup the playing thread.
//
ev = SetEvent( wakeup_playthread );
SetEvent( wakeup_playthread );
@ -752,7 +750,6 @@ audio_waveout::playing_procedure( LPVOID arg )
{
MSG msg;
WAVEHDR * phdr;
DWORD wait;
MMRESULT err;
audio_waveout * _this = ( audio_waveout * ) arg;
unsigned int read_size;
@ -775,9 +772,7 @@ audio_waveout::playing_procedure( LPVOID arg )
//
if ( _this->wakeup_playthread )
wait = WaitForSingleObject(
_this->wakeup_playthread, INFINITE
);
WaitForSingleObject(_this->wakeup_playthread, INFINITE);
@ -806,11 +801,7 @@ audio_waveout::playing_procedure( LPVOID arg )
( _this->status != WAVEOUT_FLUSHING ) &&
( _this->wakeup_playthread ))
{
wait = WaitForSingleObject(
_this->wakeup_playthread,
INFINITE
);
WaitForSingleObject(_this->wakeup_playthread, INFINITE);
}
@ -956,10 +947,8 @@ audio_waveout::playing_procedure( LPVOID arg )
if ( _this->wakeup_playthread )
wait = WaitForSingleObject(
_this->wakeup_playthread,
INFINITE
);
WaitForSingleObject(_this->wakeup_playthread,
INFINITE);
} //if ( phdr->dwUser == ( _this->buffers - 1 ))

View file

@ -542,7 +542,7 @@ WndProc_wave( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
LRESULT CALLBACK
WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
int wmId, wmEvent;
int wmId;
TCHAR str_tmp[MAX_LOADSTRING];
PAINTSTRUCT ps;
HDC hdc;
@ -724,8 +724,7 @@ WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
case WM_COMMAND:
wmId = LOWORD( wParam );
wmEvent = HIWORD( wParam );
if (( wmId >= 0 ) && ( wmId < 5 ) && ( butdisabled[wmId] == TRUE ))
break;

View file

@ -527,17 +527,12 @@ void ApplicationPageUpdate(void)
void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
{
int idctrl;
LPNMHDR pnmh;
LPNM_LISTVIEW pnmv;
LV_DISPINFO* pnmdi;
LPAPPLICATION_PAGE_LIST_ITEM pAPLI;
WCHAR szMsg[256];
idctrl = (int) wParam;
pnmh = (LPNMHDR) lParam;
pnmv = (LPNM_LISTVIEW) lParam;
pnmdi = (LV_DISPINFO*) lParam;
if (pnmh->hwndFrom == hApplicationPageListCtrl) {

View file

@ -213,18 +213,14 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
{
int idctrl;
LPNMHDR pnmh;
LPNMLISTVIEW pnmv;
NMLVDISPINFO* pnmdi;
LPNMHEADER pnmhdr;
ULONG Index;
ULONG ColumnIndex;
LPPROCESS_PAGE_LIST_ITEM pData;
idctrl = (int) wParam;
pnmh = (LPNMHDR) lParam;
pnmv = (LPNMLISTVIEW) lParam;
pnmdi = (NMLVDISPINFO*) lParam;
pnmhdr = (LPNMHEADER) lParam;

View file

@ -62,7 +62,6 @@ static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_
static void WINAPI serv_main(DWORD argc, LPWSTR *argv)
{
SERVICE_STATUS status;
int retval;
WINE_TRACE( "starting service\n" );
@ -82,7 +81,7 @@ static void WINAPI serv_main(DWORD argc, LPWSTR *argv)
SetServiceStatus( service_handle, &status );
/* Argument Ignored for now */
retval = kickoff_telnetd();
kickoff_telnetd();
WaitForSingleObject( stop_event, INFINITE );

View file

@ -510,7 +510,6 @@ CabinetOpen(VOID)
IO_STATUS_BLOCK IoStatusBlock;
UNICODE_STRING FileName;
NTSTATUS NtStatus;
ULONG Size;
RtlInitUnicodeString(&FileName, CabinetName);
@ -581,7 +580,6 @@ CabinetOpen(VOID)
return CAB_STATUS_INVALID_CAB;
}
Size = 0;
Buffer = (PUCHAR)(PCABHeader + 1);
/* Read/skip any reserved bytes */

View file

@ -39,7 +39,6 @@
INT cmd_goto (LPTSTR param)
{
LPTSTR tmp, tmp2;
LONG lNewPosHigh = 0;
TRACE ("cmd_goto (\'%s\')\n", debugstr_aw(param));
@ -68,9 +67,6 @@ INT cmd_goto (LPTSTR param)
tmp++;
*(tmp) = _T('\0');
/* set file pointer to the beginning of the batch file */
lNewPosHigh = 0;
/* jump to end of the file */
if ( _tcsicmp( param, _T(":eof"))==0)
{

View file

@ -836,7 +836,6 @@ handle_exception (int exceptionVector)
int sigval, stepping;
int addr, length;
char *ptr;
int newPC;
#ifndef WIN32 //MF
gdb_i386vector = exceptionVector;
@ -978,8 +977,6 @@ handle_exception (int exceptionVector)
if (hexToInt (&ptr, &addr))
registers[PC] = addr;
newPC = registers[PC];
/* clear the trace bit */
registers[PS] &= 0xfffffeff;

View file

@ -566,7 +566,6 @@ LoadAndBootWindowsCommon(
PLOADER_PARAMETER_BLOCK LoaderBlockVA;
BOOLEAN Status;
CHAR FileName[MAX_PATH];
PVOID NtosBase = NULL, HalBase = NULL, KdComBase = NULL;
PLDR_DATA_TABLE_ENTRY KernelDTE, HalDTE, KdComDTE = NULL;
KERNEL_ENTRY_POINT KiSystemStartup;
LPCSTR SystemRoot;
@ -582,15 +581,15 @@ LoadAndBootWindowsCommon(
OperatingSystemVersion = WinLdrDetectVersion();
/* Load kernel */
NtosBase = LoadModule(LoaderBlock, BootPath, "NTOSKRNL.EXE", &KernelDTE, 30);
LoadModule(LoaderBlock, BootPath, "NTOSKRNL.EXE", &KernelDTE, 30);
/* Load HAL */
HalBase = LoadModule(LoaderBlock, BootPath, "HAL.DLL", &HalDTE, 45);
LoadModule(LoaderBlock, BootPath, "HAL.DLL", &HalDTE, 45);
/* Load kernel-debugger support dll */
if (OperatingSystemVersion > _WIN32_WINNT_WIN2K)
{
KdComBase = LoadModule(LoaderBlock, BootPath, "KDCOM.DLL", &KdComDTE, 60);
LoadModule(LoaderBlock, BootPath, "KDCOM.DLL", &KdComDTE, 60);
}
/* Load all referenced DLLs for kernel, HAL and kdcom.dll */

View file

@ -438,17 +438,13 @@ BOOL
MyDrawCaptionTemp(HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags, THEME *theme)
{
ULONG Height;
UINT VCenter, Padding;
LONG ButtonWidth;
UINT VCenter;
HBRUSH hbr;
HGDIOBJ hFontOld;
RECT rc;
Height = theme->Size[SIZE_CAPTION_Y] - 1;
VCenter = (rect->bottom - rect->top) / 2;
Padding = VCenter - (Height / 2);
ButtonWidth = theme->Size[SIZE_SIZE_X] - 2;
if (uFlags & DC_GRADIENT)
{

View file

@ -684,7 +684,6 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
SIZE rcsize;
LOGFONT lf;
HFONT hPrevFont, hFont;
INT len;
hFont = infoPtr->Monitors[Index].hFont;
if (hFont == NULL &&
@ -698,8 +697,6 @@ MonSelGetMonitorFont(IN OUT PMONITORSELWND infoPtr,
(2 * infoPtr->SelectionFrame.cy) - 2;
rcsize.cy = (rcsize.cy * 60) / 100;
len = _tcslen(infoPtr->Monitors[Index].szCaption);
hPrevFont = SelectObject(hDC,
infoPtr->hFont);

View file

@ -110,7 +110,6 @@ CreateLayoutIcon(LPTSTR szInd)
HDC hdc, hdcsrc;
HBITMAP hBitmap, hBmpNew, hBmpOld;
RECT rect;
DWORD bkColor, bkText;
HFONT hFont = NULL;
ICONINFO IconInfo;
HICON hIcon = NULL;
@ -131,8 +130,8 @@ CreateLayoutIcon(LPTSTR szInd)
rect.bottom = 16;
rect.top = 0;
bkColor = SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
bkText = SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
ExtTextOut(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, _T(""), 0, NULL);

View file

@ -341,18 +341,17 @@ InitDigitGroupCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
TCHAR szGrouping[MAX_FMT_SIZE];
TCHAR szBuffer[MAX_FMT_SIZE];
CURRENCYFMT cyFmt;
INT ret;
INT i;
/* Get group separator */
ret = GetLocaleInfo(pGlobalData->lcid,
LOCALE_SMONTHOUSANDSEP,
szThousandSep, MAX_FMT_SIZE);
GetLocaleInfo(pGlobalData->lcid,
LOCALE_SMONTHOUSANDSEP,
szThousandSep, MAX_FMT_SIZE);
/* Get grouping */
ret = GetLocaleInfo(pGlobalData->lcid,
LOCALE_SMONGROUPING,
szGrouping, MAX_FMT_SIZE);
GetLocaleInfo(pGlobalData->lcid,
LOCALE_SMONGROUPING,
szGrouping, MAX_FMT_SIZE);
/* digit grouping */
cyFmt.NumDigits = 0;

View file

@ -116,7 +116,6 @@ InitNumOfFracSymbCB(HWND hwndDlg, LCID lcid)
TCHAR szFracNum[MAX_SAMPLES_STR_SIZE];
TCHAR szFracCount[MAX_SAMPLES_STR_SIZE];
INT nCBIndex;
INT nRetCode;
/* Get current number of fractional symbols */
GetLocaleInfo(lcid,
@ -143,10 +142,10 @@ InitNumOfFracSymbCB(HWND hwndDlg, LCID lcid)
}
/* Set current item to value from registry */
nRetCode = SendMessage(GetDlgItem(hwndDlg, IDC_NUMBERSNDIGDEC),
CB_SETCURSEL,
(WPARAM)_ttoi(szFracNum),
(LPARAM)0);
SendMessage(GetDlgItem(hwndDlg, IDC_NUMBERSNDIGDEC),
CB_SETCURSEL,
(WPARAM)_ttoi(szFracNum),
(LPARAM)0);
}
/* Init field separator control box */
@ -325,7 +324,6 @@ InitNegNumFmtCB(HWND hwndDlg, LCID lcid)
TCHAR szNewSample[MAX_SAMPLES_STR_SIZE];
LPTSTR pszResultStr;
INT nCBIndex;
INT nRetCode;
/* Get current negative numbers format */
GetLocaleInfo(lcid,
@ -372,10 +370,10 @@ InitNegNumFmtCB(HWND hwndDlg, LCID lcid)
}
/* Set current item to value from registry */
nRetCode = SendMessage(GetDlgItem(hwndDlg, IDC_NUMBERSNNUMFORMAT),
CB_SETCURSEL,
(WPARAM)_ttoi(szNegNumFmt),
(LPARAM)0);
SendMessage(GetDlgItem(hwndDlg, IDC_NUMBERSNNUMFORMAT),
CB_SETCURSEL,
(WPARAM)_ttoi(szNegNumFmt),
(LPARAM)0);
}
/* Init leading zeroes control box */
@ -386,7 +384,6 @@ InitLeadingZeroesCB(HWND hwndDlg, LCID lcid)
TCHAR szNumSep[MAX_SAMPLES_STR_SIZE];
LPTSTR pszResultStr;
INT nCBIndex;
INT nRetCode;
/* Get current leading zeroes format */
GetLocaleInfo(lcid,
@ -420,10 +417,10 @@ InitLeadingZeroesCB(HWND hwndDlg, LCID lcid)
}
/* Set current item to value from registry */
nRetCode = SendMessage(GetDlgItem(hwndDlg, IDC_NUMBERSDISPLEADZER),
CB_SETCURSEL,
(WPARAM)_ttoi(szLeadNumFmt),
(LPARAM)0);
SendMessage(GetDlgItem(hwndDlg, IDC_NUMBERSDISPLEADZER),
CB_SETCURSEL,
(WPARAM)_ttoi(szLeadNumFmt),
(LPARAM)0);
}
static VOID

View file

@ -1025,11 +1025,9 @@ SoundsDlgProc(HWND hwndDlg,
{
LVITEM item;
PLABEL_CONTEXT pLabelContext;
LPPSHNOTIFY lppsn;
TCHAR * ptr;
LPNMHDR lpnm = (LPNMHDR)lParam;
lppsn = (LPPSHNOTIFY) lParam;
switch(lpnm->code)
{

View file

@ -66,13 +66,12 @@ AddUserProfile(HWND hwndListView,
LPTSTR lpProfileSid)
{
LV_ITEM lvi;
INT iItem;
memset(&lvi, 0x00, sizeof(lvi));
lvi.mask = LVIF_TEXT | LVIF_STATE;
lvi.pszText = lpProfileSid;
lvi.state = 0;
iItem = ListView_InsertItem(hwndListView, &lvi);
ListView_InsertItem(hwndListView, &lvi);
}

View file

@ -93,7 +93,6 @@ UpdateGroupProperties(HWND hwndDlg)
TCHAR szGroupName[UNLEN];
INT iItem;
HWND hwndLV;
NET_API_STATUS status;
PLOCALGROUP_INFO_1 pGroupInfo = NULL;
hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
@ -107,7 +106,7 @@ UpdateGroupProperties(HWND hwndDlg)
szGroupName,
UNLEN);
status = NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo);
NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo);
ListView_SetItemText(hwndLV, iItem, 1,
pGroupInfo->lgrpi1_comment);

View file

@ -602,7 +602,6 @@ UpdateUserProperties(HWND hwndDlg)
TCHAR szUserName[UNLEN];
INT iItem;
HWND hwndLV;
NET_API_STATUS status;
PUSER_INFO_2 pUserInfo = NULL;
LV_ITEM lvi;
@ -617,7 +616,7 @@ UpdateUserProperties(HWND hwndDlg)
szUserName,
UNLEN);
status = NetUserGetInfo(NULL, szUserName, 2, (LPBYTE*)&pUserInfo);
NetUserGetInfo(NULL, szUserName, 2, (LPBYTE*)&pUserInfo);
memset(&lvi, 0x00, sizeof(lvi));
lvi.iItem = iItem;

View file

@ -14,13 +14,9 @@ list(APPEND SOURCE
${CMAKE_CURRENT_BINARY_DIR}/aclui.def)
add_library(aclui SHARED ${SOURCE})
allow_warnings(aclui)
set_module_type(aclui win32dll UNICODE)
add_importlib_target(aclui.spec)
add_importlibs(aclui user32 gdi32 comctl32 ole32 oleaut32 advapi32 uxtheme msvcrt kernel32 ntdll)
add_pch(aclui precomp.h)
add_cd_file(TARGET aclui DESTINATION reactos/system32 FOR all)

View file

@ -13,10 +13,8 @@ list(APPEND SOURCE
${CMAKE_CURRENT_BINARY_DIR}/advpack.def)
add_library(advpack SHARED ${SOURCE})
allow_warnings(advpack)
set_module_type(advpack win32dll)
target_link_libraries(advpack wine)
add_importlibs(advpack ole32 setupapi version advapi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET advpack DESTINATION reactos/system32 FOR all)

View file

@ -500,7 +500,6 @@ PlayNote(
{
/* Start playing the note */
NoteNode* new_node;
NoteNode* tail_node = NULL;
EnterCriticalSection(&device_lock);
@ -518,7 +517,6 @@ PlayNote(
}
#endif
tail_node = node;
node = node->next;
}

View file

@ -523,7 +523,6 @@ WSHOpenSocket2(
UNICODE_STRING TcpDeviceName = RTL_CONSTANT_STRING(DD_TCP_DEVICE_NAME);
UNICODE_STRING UdpDeviceName = RTL_CONSTANT_STRING(DD_UDP_DEVICE_NAME);
UNICODE_STRING RawDeviceName = RTL_CONSTANT_STRING(DD_RAW_IP_DEVICE_NAME);
NTSTATUS Status;
DPRINT("WSHOpenSocket2 called\n");
@ -562,7 +561,7 @@ WSHOpenSocket2(
return WSAENOBUFS;
/* Append the transport device name */
Status = RtlAppendUnicodeStringToString(TransportDeviceName, &String);
RtlAppendUnicodeStringToString(TransportDeviceName, &String);
if (*SocketType == SOCK_RAW) {
/* Append a separator */
@ -575,7 +574,7 @@ WSHOpenSocket2(
String.Length = 0;
String.MaximumLength = TransportDeviceName->MaximumLength - TransportDeviceName->Length;
Status = RtlIntegerToUnicodeString((ULONG)*Protocol, 10, &String);
RtlIntegerToUnicodeString((ULONG)*Protocol, 10, &String);
TransportDeviceName->Length += String.Length;
}

View file

@ -142,14 +142,10 @@ add_library(acpi SHARED
buspdo.c
main.c)
allow_warnings(acpi)
set_module_type(acpi kernelmodedriver)
target_link_libraries(acpi
wdmguid
acpica)
target_link_libraries(acpi wdmguid acpica)
add_importlibs(acpi ntoskrnl hal)
add_cd_file(TARGET acpi DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_subdirectory(cmbatt)

View file

@ -469,15 +469,12 @@ FdoSetPower(
IN PIRP Irp,
PIO_STACK_LOCATION IrpSp)
{
PFDO_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
UNREFERENCED_PARAMETER(Irp);
DPRINT("Called\n");
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
if (IrpSp->Parameters.Power.Type == DevicePowerState) {
/* FIXME: Set device power state for the device */
Status = STATUS_UNSUCCESSFUL;

View file

@ -137,14 +137,12 @@ PdoQueryBusInformation(
PIO_STACK_LOCATION IrpSp)
{
PPDO_DEVICE_EXTENSION DeviceExtension;
PFDO_DEVICE_EXTENSION FdoDeviceExtension;
PPNP_BUS_INFORMATION BusInformation;
UNREFERENCED_PARAMETER(IrpSp);
DPRINT("Called\n");
DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceExtension->Fdo->DeviceExtension;
BusInformation = ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION));
Irp->IoStatus.Information = (ULONG_PTR)BusInformation;
if (BusInformation != NULL)
@ -1337,14 +1335,11 @@ PdoSetPower(
IN PIRP Irp,
PIO_STACK_LOCATION IrpSp)
{
PPDO_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
UNREFERENCED_PARAMETER(Irp);
DPRINT("Called\n");
DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
if (IrpSp->Parameters.Power.Type == DevicePowerState) {
Status = STATUS_SUCCESS;
switch (IrpSp->Parameters.Power.State.SystemState) {

View file

@ -451,7 +451,6 @@ CdfsSetInformation(PDEVICE_OBJECT DeviceObject,
FILE_INFORMATION_CLASS FileInformationClass;
PIO_STACK_LOCATION Stack;
PFILE_OBJECT FileObject;
PFCB Fcb;
PVOID SystemBuffer;
NTSTATUS Status = STATUS_SUCCESS;
@ -461,7 +460,6 @@ CdfsSetInformation(PDEVICE_OBJECT DeviceObject,
Stack = IoGetCurrentIrpStackLocation(Irp);
FileInformationClass = Stack->Parameters.SetFile.FileInformationClass;
FileObject = Stack->FileObject;
Fcb = FileObject->FsContext;
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;

View file

@ -54,7 +54,6 @@ CdfsReadFile(PDEVICE_EXTENSION DeviceExt,
*/
{
NTSTATUS Status = STATUS_SUCCESS;
PCCB Ccb;
PFCB Fcb;
DPRINT("CdfsReadFile(ReadOffset %lu Length %lu)\n", ReadOffset, Length);
@ -64,7 +63,6 @@ CdfsReadFile(PDEVICE_EXTENSION DeviceExt,
if (Length == 0)
return(STATUS_SUCCESS);
Ccb = (PCCB)FileObject->FsContext2;
Fcb = (PFCB)FileObject->FsContext;
if (ReadOffset >= Fcb->Entry.DataLengthL)

View file

@ -478,7 +478,6 @@ FAT12WriteCluster(PDEVICE_EXTENSION DeviceExt,
* FUNCTION: Writes a cluster to the FAT12 physical and in-memory tables
*/
{
ULONG FATsector;
ULONG FATOffset;
PUCHAR CBlock;
PVOID BaseAddress;
@ -510,7 +509,6 @@ FAT12WriteCluster(PDEVICE_EXTENSION DeviceExt,
CBlock[FATOffset + 1] = (UCHAR)(NewValue >> 4);
}
/* Write the changed FAT sector(s) to disk */
FATsector = FATOffset / DeviceExt->FatInfo.BytesPerSector;
CcSetDirtyPinnedData(Context, NULL);
CcUnpinData(Context);
return(STATUS_SUCCESS);

View file

@ -749,7 +749,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
LARGE_INTEGER OldFileSize;
NTSTATUS Status = STATUS_SUCCESS;
ULONG Length = 0;
ULONG OldAllocationSize;
PVOID Buffer;
ULONG BytesPerSector;
@ -905,7 +904,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
}
OldFileSize = Fcb->RFCB.FileSize;
OldAllocationSize = Fcb->RFCB.AllocationSize.u.LowPart;
Buffer = VfatGetUserBuffer(IrpContext->Irp);
if (!Buffer)

View file

@ -76,7 +76,6 @@ MsfsQueryInformation(PDEVICE_OBJECT DeviceObject,
PIO_STACK_LOCATION IoStack;
FILE_INFORMATION_CLASS FileInformationClass;
PFILE_OBJECT FileObject;
PMSFS_DEVICE_EXTENSION DeviceExtension;
PMSFS_FCB Fcb;
PMSFS_CCB Ccb;
PVOID SystemBuffer;
@ -88,7 +87,6 @@ MsfsQueryInformation(PDEVICE_OBJECT DeviceObject,
IoStack = IoGetCurrentIrpStackLocation (Irp);
FileInformationClass = IoStack->Parameters.QueryFile.FileInformationClass;
DeviceExtension = DeviceObject->DeviceExtension;
FileObject = IoStack->FileObject;
Fcb = (PMSFS_FCB)FileObject->FsContext;
Ccb = (PMSFS_CCB)FileObject->FsContext2;

View file

@ -23,7 +23,6 @@ MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PMSFS_FCB Fcb;
PMSFS_CCB Ccb;
NTSTATUS Status;
DPRINT1("MsfsFileSystemControl(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
@ -31,7 +30,6 @@ MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
Fcb = FileObject->FsContext;
Ccb = FileObject->FsContext2;
DPRINT1("Mailslot name: %wZ\n", &Fcb->Name);

View file

@ -324,7 +324,6 @@ NtfsMountVolume(PDEVICE_OBJECT DeviceObject,
PNTFS_FCB Fcb = NULL;
PNTFS_CCB Ccb = NULL;
PNTFS_VCB Vcb = NULL;
PVPB Vpb;
NTSTATUS Status;
DPRINT1("NtfsMountVolume() called\n");
@ -337,7 +336,6 @@ NtfsMountVolume(PDEVICE_OBJECT DeviceObject,
Stack = IoGetCurrentIrpStackLocation(Irp);
DeviceToMount = Stack->Parameters.MountVolume.DeviceObject;
Vpb = Stack->Parameters.MountVolume.Vpb;
Status = NtfsHasFileSystem(DeviceToMount);
if (!NT_SUCCESS(Status))

View file

@ -14,14 +14,12 @@ SerialQueryInformation(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PSERIAL_DEVICE_EXTENSION DeviceExtension;
PIO_STACK_LOCATION Stack;
PVOID SystemBuffer;
ULONG BufferLength;
ULONG_PTR Information = 0;
NTSTATUS Status;
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
Stack = IoGetCurrentIrpStackLocation(Irp);
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
BufferLength = Stack->Parameters.QueryFile.Length;

View file

@ -29,7 +29,6 @@ ReadBytes(
PWORKITEM_DATA WorkItemData)
{
PSERIAL_DEVICE_EXTENSION DeviceExtension;
PUCHAR ComPortBase;
ULONG Length;
PUCHAR Buffer;
UCHAR ReceivedByte;
@ -44,7 +43,6 @@ ReadBytes(
ASSERT(WorkItemData);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
Length = IoGetCurrentIrpStackLocation(Irp)->Parameters.Read.Length;
Buffer = SerialGetUserBuffer(Irp);
@ -259,7 +257,6 @@ SerialWrite(
ULONG Length;
ULONG_PTR Information = 0;
PUCHAR Buffer;
PUCHAR ComPortBase;
KIRQL Irql;
NTSTATUS Status = STATUS_SUCCESS;
@ -272,7 +269,6 @@ SerialWrite(
Length = Stack->Parameters.Write.Length;
Buffer = SerialGetUserBuffer(Irp);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
if (Stack->Parameters.Write.ByteOffset.QuadPart != 0 || Buffer == NULL)
{

View file

@ -4361,7 +4361,6 @@ RetryControl:
LARGE_INTEGER startingOffset;
ULONG transferBytes;
ULONG startingSector;
PRAW_READ_INFO rawReadInfo = (PRAW_READ_INFO)irpStack->Parameters.DeviceIoControl.Type3InputBuffer;
PUCHAR userData = (PUCHAR)Irp->AssociatedIrp.SystemBuffer;
@ -4415,7 +4414,6 @@ RetryControl:
}
startingOffset.QuadPart = rawReadInfo->DiskOffset.QuadPart;
startingSector = (ULONG)(rawReadInfo->DiskOffset.QuadPart >> deviceExtension->SectorShift);
transferBytes = rawReadInfo->SectorCount * RAW_SECTOR_SIZE;
if (irpStack->Parameters.DeviceIoControl.OutputBufferLength < transferBytes) {
@ -6742,7 +6740,6 @@ Return Value:
PREAD_CAPACITY_DATA capacityBuffer;
PIO_STACK_LOCATION irpStack;
PUCHAR senseBuffer;
NTSTATUS status;
irp = IoAllocateIrp((CCHAR)(DeviceExtension->DeviceObject->StackSize+1),
FALSE);
@ -6847,7 +6844,7 @@ Return Value:
IrpToComplete->IoStatus.Status = STATUS_VERIFY_REQUIRED;
IoMarkIrpPending(IrpToComplete);
status = IoCallDriver(DeviceExtension->PortDeviceObject, irp);
IoCallDriver(DeviceExtension->PortDeviceObject, irp);
//
// status is not checked because the completion routine for this

View file

@ -19,6 +19,7 @@ add_library(uniata SHARED
idedma.rc
ros_glue/ros_glue.cpp)
allow_warnings(uniata)
add_pch(uniata stdafx.h)
set_module_type(uniata kernelmodedriver)
add_importlibs(uniata scsiport ntoskrnl hal)

View file

@ -22,3 +22,4 @@ list(APPEND SOURCE
add_library(adns ${SOURCE})
add_dependencies(adns psdk)
allow_warnings(adns)

View file

@ -49,3 +49,4 @@ list(APPEND SOURCE
src/winfonts/winfnt.c)
add_library(freetype ${SOURCE})
allow_warnings(freetype)

View file

@ -41,3 +41,4 @@ add_library(libmpg123
tabinit.c)
add_dependencies(libmpg123 psdk)
allow_warnings(libmpg123)

View file

@ -12,3 +12,4 @@ list(APPEND SOURCE
add_library(ext2lib ${SOURCE})
add_pch(ext2lib Mke2fs.h)
add_dependencies(ext2lib psdk)
allow_warnings(ext2lib)