* Fix some unused but set variables. Brought to you by gcc 4.6.1.
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 10 Sep 2011 21:31:09 +0000 (21:31 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 10 Sep 2011 21:31:09 +0000 (21:31 +0000)
* Allow warnings for some 3rd party code.

svn path=/trunk/; revision=53676

44 files changed:
reactos/base/applications/msconfig/msconfig.c
reactos/base/applications/msconfig/startuppage.c
reactos/base/applications/network/telnet/src/tnconfig.cpp
reactos/base/applications/sndrec32/audio_wavein.cpp
reactos/base/applications/sndrec32/audio_waveout.cpp
reactos/base/applications/sndrec32/sndrec32.cpp
reactos/base/applications/taskmgr/applpage.c
reactos/base/applications/taskmgr/procpage.c
reactos/base/services/telnetd/serviceentry.c
reactos/base/setup/usetup/cabinet.c
reactos/base/shell/cmd/goto.c
reactos/base/shell/explorer/i386-stub-win32.c
reactos/boot/freeldr/freeldr/windows/winldr.c
reactos/dll/cpl/desk/draw.c
reactos/dll/cpl/desk/monslctl.c
reactos/dll/cpl/input/settings.c
reactos/dll/cpl/intl/currency.c
reactos/dll/cpl/intl/numbers.c
reactos/dll/cpl/mmsys/sounds.c
reactos/dll/cpl/sysdm/userprofile.c
reactos/dll/cpl/usrmgr/groups.c
reactos/dll/cpl/usrmgr/users.c
reactos/dll/win32/aclui/CMakeLists.txt
reactos/dll/win32/advpack/CMakeLists.txt
reactos/dll/win32/beepmidi/beepmidi.c
reactos/dll/win32/wshtcpip/wshtcpip.c
reactos/drivers/bus/acpi/CMakeLists.txt
reactos/drivers/bus/pci/fdo.c
reactos/drivers/bus/pci/pdo.c
reactos/drivers/filesystems/cdfs/finfo.c
reactos/drivers/filesystems/cdfs/rw.c
reactos/drivers/filesystems/fastfat/fat.c
reactos/drivers/filesystems/fastfat/rw.c
reactos/drivers/filesystems/msfs/finfo.c
reactos/drivers/filesystems/msfs/fsctrl.c
reactos/drivers/filesystems/ntfs/fsctl.c
reactos/drivers/serial/serial/info.c
reactos/drivers/serial/serial/rw.c
reactos/drivers/storage/class/cdrom/cdrom.c
reactos/drivers/storage/ide/uniata/CMakeLists.txt
reactos/lib/3rdparty/adns/CMakeLists.txt
reactos/lib/3rdparty/freetype/CMakeLists.txt
reactos/lib/3rdparty/libmpg123/CMakeLists.txt
reactos/lib/fslib/ext2lib/CMakeLists.txt

index 7f68f98..7440d03 100644 (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) &&
index f5bcd6d..8325e1c 100644 (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;
index 9a9ad5c..24d2da8 100644 (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) {
index bb64191..00dc08a 100644 (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);
+
                     }
 
 
index 9850aa5..eeeb462 100644 (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 ))
 
index 3206c2f..8408de8 100644 (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;
 
index 673cdad..0bcaf10 100644 (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) {
index 5276906..4695fb9 100644 (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;
 
index 16e36ab..f53fc1c 100644 (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 );
 
index 0e8200a..7d3486d 100644 (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 */
index 3e285a5..71e7102 100644 (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)
        {
index 9bd83d3..5262ee3 100644 (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;
 
index 4c26203..fe91c63 100644 (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 */
index 8107b24..3a4b8c2 100644 (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)
        {
index 0a15cf8..7d0e84f 100644 (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);
 
index 849d70c..a55bf0c 100644 (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);
 
index 74df951..c3b1041 100644 (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;
index 3169879..e1cae19 100644 (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
index 48ba4f4..01297a0 100644 (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)
             {
index 462514d..cd0da0e 100644 (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);
 }
 
 
index 445d90a..267d895 100644 (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);
index 174ec2f..dc1f9ab 100644 (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;
index 902bffa..4e5455b 100644 (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)
index b81a489..a11becd 100644 (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)
index cc8cfa1..54cf7d3 100644 (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;
         }
 
index 65d7cb0..f9393a0 100644 (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;
     }
index 42b1bff..d352283 100644 (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)
index 5f9ed35..94f7a5f 100644 (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;
index ac9ff6a..65f7614 100644 (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) {
index 07554c2..3ad68bc 100644 (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;
 
index af0442e..4009589 100644 (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)
index b9157ad..b3b86d5 100644 (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);
index 5dd906b..a0efa5e 100644 (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)
index 16c6496..bacf262 100644 (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;
index 69bf169..be54c44 100644 (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);
 
index ce63429..d34ef20 100644 (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))
index b0952d5..2ebe6b0 100644 (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;
index 00085c1..716e34b 100644 (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)
        {
index bc2f259..39cfe71 100644 (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
index ab0e3dd..31fc8f3 100644 (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)
index cfc7d0a..9d22f87 100644 (file)
@@ -22,3 +22,4 @@ list(APPEND SOURCE
 
 add_library(adns ${SOURCE})
 add_dependencies(adns psdk)
+allow_warnings(adns)
index 35ad946..ee2855b 100644 (file)
@@ -49,3 +49,4 @@ list(APPEND SOURCE
   src/winfonts/winfnt.c)
 
 add_library(freetype ${SOURCE})
+allow_warnings(freetype)
index be3bafc..6494064 100644 (file)
@@ -41,3 +41,4 @@ add_library(libmpg123
     tabinit.c)
 
 add_dependencies(libmpg123 psdk)
+allow_warnings(libmpg123)
index c5f771c..b5eb69c 100644 (file)
@@ -12,3 +12,4 @@ list(APPEND SOURCE
 add_library(ext2lib ${SOURCE})
 add_pch(ext2lib Mke2fs.h)
 add_dependencies(ext2lib psdk)
+allow_warnings(ext2lib)