fix warnings on gcc 4.1.2

svn path=/trunk/; revision=26269
This commit is contained in:
Timo Kreuzer 2007-04-06 14:24:59 +00:00
parent 96924455c4
commit 5f5b06dc4b
3 changed files with 22 additions and 22 deletions

View file

@ -32,31 +32,31 @@ HandleList_Create(HWND hListCtrl)
column.pszText = L"Number"; column.pszText = L"Number";
column.cx = 50; column.cx = 50;
ListView_InsertColumn(hListCtrl, 0, &column); (void)ListView_InsertColumn(hListCtrl, 0, &column);
column.pszText = L"Index"; column.pszText = L"Index";
column.cx = 50; column.cx = 45;
ListView_InsertColumn(hListCtrl, 1, &column); (void)ListView_InsertColumn(hListCtrl, 1, &column);
column.pszText = L"Handle"; column.pszText = L"Handle";
column.cx = 90; column.cx = 90;
ListView_InsertColumn(hListCtrl, 2, &column); (void)ListView_InsertColumn(hListCtrl, 2, &column);
column.pszText = L"Type"; column.pszText = L"Type";
column.cx = 90; column.cx = 80;
ListView_InsertColumn(hListCtrl, 3, &column); (void)ListView_InsertColumn(hListCtrl, 3, &column);
column.pszText = L"Process"; column.pszText = L"Process";
column.cx = 90; column.cx = 80;
ListView_InsertColumn(hListCtrl, 4, &column); (void)ListView_InsertColumn(hListCtrl, 4, &column);
column.pszText = L"KernelData"; column.pszText = L"KernelData";
column.cx = 90; column.cx = 80;
ListView_InsertColumn(hListCtrl, 5, &column); (void)ListView_InsertColumn(hListCtrl, 5, &column);
column.pszText = L"UserData"; column.pszText = L"UserData";
column.cx = 90; column.cx = 80;
ListView_InsertColumn(hListCtrl, 6, &column); (void)ListView_InsertColumn(hListCtrl, 6, &column);
HandleList_Update(hListCtrl, 0); HandleList_Update(hListCtrl, 0);
} }
@ -70,7 +70,7 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
TCHAR strText[80]; TCHAR strText[80];
TCHAR* str2; TCHAR* str2;
ListView_DeleteAllItems(hHandleListCtrl); (void)ListView_DeleteAllItems(hHandleListCtrl);
item.mask = LVIF_TEXT|LVIF_PARAM; item.mask = LVIF_TEXT|LVIF_PARAM;
item.pszText = strText; item.pszText = strText;
item.cchTextMax = 80; item.cchTextMax = 80;
@ -86,7 +86,7 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
item.iSubItem = 0; item.iSubItem = 0;
wsprintf(strText, L"%d", index); wsprintf(strText, L"%d", index);
ListView_InsertItem(hHandleListCtrl, &item); (void)ListView_InsertItem(hHandleListCtrl, &item);
wsprintf(strText, L"%d", i); wsprintf(strText, L"%d", i);
ListView_SetItemText(hHandleListCtrl, index, 1, strText); ListView_SetItemText(hHandleListCtrl, index, 1, strText);

View file

@ -64,7 +64,7 @@ MainWindow_WndProc(HWND hMainWnd, UINT message, WPARAM wParam, LPARAM lParam)
memset(&item, 0, sizeof(LV_ITEM)); memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_PARAM; item.mask = LVIF_PARAM;
item.iItem = ListView_GetSelectionMark(hProcessListCtrl); item.iItem = ListView_GetSelectionMark(hProcessListCtrl);
ListView_GetItem(hProcessListCtrl, &item); (void)ListView_GetItem(hProcessListCtrl, &item);
HandleList_Update(GetDlgItem(hMainWnd, IDC_HANDLELIST), (HANDLE)item.lParam); HandleList_Update(GetDlgItem(hMainWnd, IDC_HANDLELIST), (HANDLE)item.lParam);
break; break;
} }
@ -91,7 +91,7 @@ MainWindow_WndProc(HWND hMainWnd, UINT message, WPARAM wParam, LPARAM lParam)
memset(&item, 0, sizeof(LV_ITEM)); memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_PARAM; item.mask = LVIF_PARAM;
item.iItem = ((LPNMLISTVIEW)lParam)->iItem; item.iItem = ((LPNMLISTVIEW)lParam)->iItem;
ListView_GetItem(GetDlgItem(hMainWnd, IDC_PROCESSLIST), &item); (void)ListView_GetItem(GetDlgItem(hMainWnd, IDC_PROCESSLIST), &item);
HandleList_Update(GetDlgItem(hMainWnd, IDC_HANDLELIST), (HANDLE)item.lParam); HandleList_Update(GetDlgItem(hMainWnd, IDC_HANDLELIST), (HANDLE)item.lParam);
return TRUE; return TRUE;
break; break;

View file

@ -32,11 +32,11 @@ ProcessList_Create(HWND hListCtrl)
column.pszText = L"Process"; column.pszText = L"Process";
column.cx = 90; column.cx = 90;
ListView_InsertColumn(hListCtrl, 0, &column); (void)ListView_InsertColumn(hListCtrl, 0, &column);
column.pszText = L"ProcessID"; column.pszText = L"ProcessID";
column.cx = 90; column.cx = 90;
ListView_InsertColumn(hListCtrl, 1, &column); (void)ListView_InsertColumn(hListCtrl, 1, &column);
ProcessList_Update(hListCtrl); ProcessList_Update(hListCtrl);
} }
@ -49,7 +49,7 @@ ProcessList_Update(HWND hListCtrl)
WCHAR strText[MAX_PATH] = L"<unknown>"; WCHAR strText[MAX_PATH] = L"<unknown>";
INT i; INT i;
ListView_DeleteAllItems(hListCtrl); (void)ListView_DeleteAllItems(hListCtrl);
memset(&item, 0, sizeof(LV_ITEM)); memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_TEXT|LVIF_PARAM; item.mask = LVIF_TEXT|LVIF_PARAM;
item.pszText = strText; item.pszText = strText;
@ -58,7 +58,7 @@ ProcessList_Update(HWND hListCtrl)
item.iItem = 0; item.iItem = 0;
item.lParam = 0; item.lParam = 0;
item.pszText = L"<Kernel>"; item.pszText = L"<Kernel>";
ListView_InsertItem(hListCtrl, &item); (void)ListView_InsertItem(hListCtrl, &item);
item.pszText = strText; item.pszText = strText;
wsprintf(strText, L"%#08x", 0); wsprintf(strText, L"%#08x", 0);
ListView_SetItemText(hListCtrl, 0, 1, strText); ListView_SetItemText(hListCtrl, 0, 1, strText);
@ -80,13 +80,13 @@ ProcessList_Update(HWND hListCtrl)
hProcess = 0; hProcess = 0;
/* FIXME: HACK: ROS crashes when using OpenProcess with PROCESS_VM_READ */ /* FIXME: HACK: ROS crashes when using OpenProcess with PROCESS_VM_READ */
// hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, ProcessIds[i]); hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, ProcessIds[i]);
if (hProcess) if (hProcess)
{ {
GetModuleBaseName(hProcess, NULL, (LPWSTR)strText, MAX_PATH ); GetModuleBaseName(hProcess, NULL, (LPWSTR)strText, MAX_PATH );
CloseHandle(hProcess); CloseHandle(hProcess);
} }
ListView_InsertItem(hListCtrl, &item); (void)ListView_InsertItem(hListCtrl, &item);
wsprintf(strText, L"%#08x", ProcessIds[i]); wsprintf(strText, L"%#08x", ProcessIds[i]);
ListView_SetItemText(hListCtrl, item.iItem, 1, strText); ListView_SetItemText(hListCtrl, item.iItem, 1, strText);