ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2010
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
438 discussions
Start a n
N
ew thread
[tkreuzer] 47465: [lib/3rdparty] Disable unused value warning here, too
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 30 23:32:28 2010 New Revision: 47465 URL:
http://svn.reactos.org/svn/reactos?rev=47465&view=rev
Log: [lib/3rdparty] Disable unused value warning here, too Modified: trunk/reactos/lib/3rdparty/3rdparty.rbuild Modified: trunk/reactos/lib/3rdparty/3rdparty.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/3rdparty.rbui…
============================================================================== --- trunk/reactos/lib/3rdparty/3rdparty.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/3rdparty.rbuild [iso-8859-1] Sun May 30 23:32:28 2010 @@ -1,6 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd"> <group xmlns:xi="
http://www.w3.org/2001/XInclude
"> + <group compilerset="gcc"> + <compilerflag compiler="cc">-Wno-unused-value</compilerflag> + </group> <directory name="adns"> <xi:include href="adns/adns.rbuild" /> </directory>
14 years, 8 months
1
0
0
0
[gschneider] 47464: [KERNEL32] Return nothing from InternalCopyDeviceFindDataA/W functions
by gschneider@svn.reactos.org
Author: gschneider Date: Sun May 30 23:19:26 2010 New Revision: 47464 URL:
http://svn.reactos.org/svn/reactos?rev=47464&view=rev
Log: [KERNEL32] Return nothing from InternalCopyDeviceFindDataA/W functions Modified: trunk/reactos/dll/win32/kernel32/file/find.c Modified: trunk/reactos/dll/win32/kernel32/file/find.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/find.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/find.c [iso-8859-1] Sun May 30 23:19:26 2010 @@ -54,7 +54,7 @@ /* FUNCTIONS ****************************************************************/ -static HANDLE +static VOID InternalCopyDeviceFindDataW(LPWIN32_FIND_DATAW lpFindFileData, LPCWSTR lpFileName, ULONG DeviceNameInfo) @@ -71,11 +71,9 @@ RtlCopyMemory(lpFindFileData->cFileName, DeviceName.Buffer, DeviceName.Length); - - return FIND_DEVICE_HANDLE; -} - -static HANDLE +} + +static VOID InternalCopyDeviceFindDataA(LPWIN32_FIND_DATAA lpFindFileData, PUNICODE_STRING FileName, ULONG DeviceNameInfo) @@ -101,8 +99,6 @@ RtlCopyMemory(lpFindFileData->cFileName, BufferA.Buffer, BufferA.Length); - - return FIND_DEVICE_HANDLE; } static VOID
14 years, 8 months
1
0
0
0
[tkreuzer] 47463: [WINETESTS] Disable unused value warnings
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 30 23:01:52 2010 New Revision: 47463 URL:
http://svn.reactos.org/svn/reactos?rev=47463&view=rev
Log: [WINETESTS] Disable unused value warnings Modified: trunk/rostests/winetests/directory.rbuild Modified: trunk/rostests/winetests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/directory.rbuil…
============================================================================== --- trunk/rostests/winetests/directory.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/directory.rbuild [iso-8859-1] Sun May 30 23:01:52 2010 @@ -1,6 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd"> <group xmlns:xi="
http://www.w3.org/2001/XInclude
"> + <group compilerset="gcc"> + <compilerflag compiler="cc">-Wno-unused-value</compilerflag> + </group> <directory name="advapi32"> <xi:include href="advapi32/advapi32.rbuild" /> </directory>
14 years, 8 months
1
0
0
0
[tkreuzer] 47462: [PSEH] Use dummy pseh for clang
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun May 30 22:57:02 2010 New Revision: 47462 URL:
http://svn.reactos.org/svn/reactos?rev=47462&view=rev
Log: [PSEH] Use dummy pseh for clang Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Sun May 30 22:57:02 2010 @@ -26,7 +26,7 @@ #ifndef KJK_PSEH2_H_ #define KJK_PSEH2_H_ -#if !defined (__arm__) +#if !defined (__arm__) && !defined(__clang__) #if defined(__GNUC__) struct _EXCEPTION_RECORD; @@ -395,7 +395,7 @@ #define _SEH2_END } #define _SEH2_GetExceptionInformation() -#define _SEH2_GetExceptionCode() STATUS_SUCCESS +#define _SEH2_GetExceptionCode() 0 #define _SEH2_AbnormalTermination() #define _SEH2_YIELD(STMT_) STMT_
14 years, 8 months
1
0
0
0
[gschneider] 47461: Various application fixes by Jan Roeloffzen, bug #5182, part 4/4 dxdiag: tabs -> spaces, UINT -> UINT_PTR, remove unused assignments, simplify code, fix compiler warnings
by gschneider@svn.reactos.org
Author: gschneider Date: Sun May 30 22:36:20 2010 New Revision: 47461 URL:
http://svn.reactos.org/svn/reactos?rev=47461&view=rev
Log: Various application fixes by Jan Roeloffzen, bug #5182, part 4/4 dxdiag: tabs -> spaces, UINT -> UINT_PTR, remove unused assignments, simplify code, fix compiler warnings Modified: trunk/reactos/base/applications/dxdiag/ddtest.c trunk/reactos/base/applications/dxdiag/input.c trunk/reactos/base/applications/dxdiag/network.c trunk/reactos/base/applications/dxdiag/sound.c Modified: trunk/reactos/base/applications/dxdiag/ddtest.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
============================================================================== --- trunk/reactos/base/applications/dxdiag/ddtest.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/ddtest.c [iso-8859-1] Sun May 30 22:36:20 2010 @@ -151,7 +151,7 @@ { if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - if (msg.message == WM_TIMER && TimerID == msg.wParam) + if (msg.message == WM_TIMER && TimerID == msg.wParam) break; TranslateMessage(&msg); DispatchMessage(&msg); @@ -200,7 +200,7 @@ BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen){ - UINT TimerID, TimerIDUpdate; + UINT_PTR TimerID, TimerIDUpdate; LPDIRECTDRAW lpDD; LPDIRECTDRAWSURFACE lpDDPrimarySurface; LPDIRECTDRAWSURFACE lpDDBackBuffer; @@ -288,6 +288,7 @@ /* set our timers, TimerID - for test timeout, TimerIDUpdate - for frame updating */ TimerID = SetTimer(hWnd, -1, (UINT)TEST_DURATION, NULL); TimerIDUpdate = SetTimer(hWnd, 2, (UINT)10, NULL); + (void)TimerIDUpdate; while (TRUE) { Modified: trunk/reactos/base/applications/dxdiag/input.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/i…
============================================================================== --- trunk/reactos/base/applications/dxdiag/input.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/input.c [iso-8859-1] Sun May 30 22:36:20 2010 @@ -129,13 +129,13 @@ ZeroMemory(&GuidPath, sizeof(DIPROPGUIDANDPATH)); GuidPath.diph.dwSize = sizeof(DIPROPGUIDANDPATH); GuidPath.diph.dwHeaderSize = sizeof(DIPROPHEADER); - GuidPath.diph.dwHow = DIPH_DEVICE; + GuidPath.diph.dwHow = DIPH_DEVICE; hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_GUIDANDPATH, (LPDIPROPHEADER)&GuidPath); ZeroMemory(&TypeName, sizeof(TypeName)); TypeName.diph.dwSize = sizeof(TypeName); TypeName.diph.dwHeaderSize = sizeof(DIPROPHEADER); - TypeName.diph.dwHow = DIPH_DEVICE; + TypeName.diph.dwHow = DIPH_DEVICE; hResult = pDev->lpVtbl->GetProperty(pDev, DIPROP_GETPORTDISPLAYNAME, (LPDIPROPHEADER)&TypeName); @@ -191,7 +191,7 @@ Context.pObj = pObj; Context.hwndDlg = hwndDlg; InitListViewColumns(&Context); - hResult = pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL, DirectInputEnumDevCb, (PVOID)&Context, DIEDFL_ALLDEVICES); + pObj->lpVtbl->EnumDevices(pObj, DI8DEVCLASS_ALL, DirectInputEnumDevCb, (PVOID)&Context, DIEDFL_ALLDEVICES); pObj->lpVtbl->Release(pObj); } Modified: trunk/reactos/base/applications/dxdiag/network.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/n…
============================================================================== --- trunk/reactos/base/applications/dxdiag/network.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/network.c [iso-8859-1] Sun May 30 22:36:20 2010 @@ -178,10 +178,10 @@ { DWORD dwIndex = 0; LONG result; - WCHAR szName[50]; + WCHAR szName[50]; WCHAR szGUID[40]; WCHAR szTemp[63]; - WCHAR szResult[MAX_PATH+20] = {0}; + WCHAR szResult[MAX_PATH+20] = {0}; DWORD RegProviders = 0; DWORD ProviderIndex; DWORD dwName; @@ -203,13 +203,12 @@ szResult[0] = L'\0'; LoadStringW(hInst, PreDefProviders[dwIndex].ResourceID, szResult, sizeof(szResult)/sizeof(WCHAR)); szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0'; - lResult = SendMessageW(hDlgCtrl, LVM_INSERTITEM, 0, (LPARAM)&Item); + Item.iItem = SendMessageW(hDlgCtrl, LVM_INSERTITEM, 0, (LPARAM)&Item); + Item.iSubItem = 1; szResult[0] = L'\0'; LoadStringW(hInst, IDS_REG_FAIL, szResult, sizeof(szResult)/sizeof(WCHAR)); szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0'; - Item.iItem = lResult; - Item.iSubItem = 1; - lResult = SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item); + SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item); } dwIndex = 0; @@ -228,8 +227,7 @@ if (ProviderIndex == UINT_MAX) { /* a custom service provider was found */ - lResult = ListView_GetItemCount(hDlgCtrl); - Item.iItem = lResult; + Item.iItem = ListView_GetItemCount(hDlgCtrl); /* FIXME * on Windows Vista we need to use RegLoadMUIString which is not available for older systems @@ -291,7 +289,7 @@ } } dwIndex++; - }while(result != ERROR_NO_MORE_ITEMS); + }while(result != ERROR_NO_MORE_ITEMS); /* check if all providers have been registered */ // if (RegProviders == 15) @@ -330,7 +328,7 @@ return; /* enumerate providers */ - result = EnumerateServiceProviders(hKey, hDlgCtrl, DirectPlaySP); + EnumerateServiceProviders(hKey, hDlgCtrl, DirectPlaySP); RegCloseKey(hKey); } Modified: trunk/reactos/base/applications/dxdiag/sound.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/s…
============================================================================== --- trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] Sun May 30 22:36:20 2010 @@ -275,6 +275,7 @@ /* release the DSound object */ // pObj->lpVtbl->Release(pObj); + (void)hResult; }
14 years, 8 months
1
0
0
0
[gschneider] 47460: Various application fixes by Jan Roeloffzen, bug #5182, part 3 arp: Remove unused variables ftp: tabs->spaces, remove unused variables nslookup: Remove unused variables
by gschneider@svn.reactos.org
Author: gschneider Date: Sun May 30 22:31:58 2010 New Revision: 47460 URL:
http://svn.reactos.org/svn/reactos?rev=47460&view=rev
Log: Various application fixes by Jan Roeloffzen, bug #5182, part 3 arp: Remove unused variables ftp: tabs->spaces, remove unused variables nslookup: Remove unused variables Modified: trunk/reactos/base/applications/network/arp/arp.c trunk/reactos/base/applications/network/ftp/fake.c trunk/reactos/base/applications/network/ftp/ftp.c trunk/reactos/base/applications/network/nslookup/nslookup.c Modified: trunk/reactos/base/applications/network/arp/arp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/arp/arp.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/arp/arp.c [iso-8859-1] Sun May 30 22:31:58 2010 @@ -170,9 +170,7 @@ ZeroMemory(pIpNetTable, sizeof(*pIpNetTable)); - iRet = GetIpNetTable(pIpNetTable, &Size, TRUE); - - if (iRet != NO_ERROR) + if (GetIpNetTable(pIpNetTable, &Size, TRUE) != NO_ERROR) { _tprintf(_T("failed to allocate memory for GetIpNetTable\n")); DoFormatMessage(); @@ -201,9 +199,7 @@ ZeroMemory(pIpAddrTable, sizeof(*pIpAddrTable)); - iRet = GetIpAddrTable(pIpAddrTable, &Size, TRUE); - - if (iRet != NO_ERROR) + if ((iRet = GetIpAddrTable(pIpAddrTable, &Size, TRUE)) != NO_ERROR) { _tprintf(_T("GetIpAddrTable failed: %d\n"), iRet); DoFormatMessage(); @@ -272,7 +268,7 @@ PMIB_IPNETTABLE pIpNetTable = NULL; DWORD dwIpAddr = 0; ULONG Size = 0; - INT iRet, i, val, c; + INT i, val, c; /* error checking */ @@ -320,9 +316,7 @@ ZeroMemory(pIpNetTable, sizeof(*pIpNetTable)); - iRet = GetIpNetTable(pIpNetTable, &Size, TRUE); - - if (iRet != NO_ERROR) + if (GetIpNetTable(pIpNetTable, &Size, TRUE) != NO_ERROR) { _tprintf(_T("failed to allocate memory for GetIpNetTable\n")); DoFormatMessage(); @@ -382,7 +376,7 @@ /* Add the ARP entry */ - if ((iRet = SetIpNetEntry(pAddHost)) != NO_ERROR) + if (SetIpNetEntry(pAddHost) != NO_ERROR) { DoFormatMessage(); goto cleanup; @@ -415,7 +409,6 @@ PMIB_IPNETTABLE pIpNetTable = NULL; ULONG Size = 0; DWORD dwIpAddr = 0; - INT iRet; BOOL bFlushTable = FALSE; /* error checking */ @@ -449,9 +442,7 @@ ZeroMemory(pIpNetTable, sizeof(*pIpNetTable)); - iRet = GetIpNetTable(pIpNetTable, &Size, TRUE); - - if (iRet != NO_ERROR) + if (GetIpNetTable(pIpNetTable, &Size, TRUE) != NO_ERROR) { _tprintf(_T("failed to allocate memory for GetIpNetTable\n")); DoFormatMessage(); @@ -485,7 +476,7 @@ if (bFlushTable == TRUE) { /* delete arp cache */ - if ((iRet = FlushIpNetTable(pDelHost->dwIndex)) != NO_ERROR) + if (FlushIpNetTable(pDelHost->dwIndex) != NO_ERROR) { DoFormatMessage(); goto cleanup; @@ -501,7 +492,7 @@ pDelHost->dwAddr = dwIpAddr; /* Add the ARP entry */ - if ((iRet = DeleteIpNetEntry(pDelHost)) != NO_ERROR) + if (DeleteIpNetEntry(pDelHost) != NO_ERROR) { DoFormatMessage(); goto cleanup; Modified: trunk/reactos/base/applications/network/ftp/fake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ftp/fake.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ftp/fake.c [iso-8859-1] Sun May 30 22:31:58 2010 @@ -29,10 +29,10 @@ void blkfree(char **av0) { - register char **av = av0; - - while (*av) - free(*av++); + register char **av = av0; + + while (*av) + free(*av++); } char **glob(register char *v) @@ -52,16 +52,16 @@ #if 0 int gettimeofday(struct timeval *timenow, - struct timezone *zone) -{ - time_t t; - - t = clock(); - - timenow->tv_usec = t; - timenow->tv_sec = t / CLK_TCK; - - return 0; + struct timezone *zone) +{ + time_t t; + + t = clock(); + + timenow->tv_usec = t; + timenow->tv_sec = t / CLK_TCK; + + return 0; } int fgetcSocket(int s) @@ -100,13 +100,13 @@ total = recv(s, buffer, sizeof(buffer), 0); if (total == SOCKET_ERROR) - { - total = 0; - return ERROR; - } + { + total = 0; + return ERROR; + } if (total == 0) - return EOF; + return EOF; } return buffer[index++]; } @@ -142,29 +142,29 @@ buffer[1] = '\0'; if(SOCKET_ERROR==send(s, buffer, 1, 0)) { - int iret=WSAGetLastError (); - fprintf(stdout,"fputcSocket: %d\n",iret); - return 0; + int iret=WSAGetLastError (); + fprintf(stdout,"fputcSocket: %d\n",iret); + return 0; } else { - return putChar; + return putChar; } } int fputSocket(int s, char *buffer, int len) { - int iret; - while(len) { - if(SOCKET_ERROR==(iret=send(s, buffer, len, 0))) - { - iret=WSAGetLastError (); - fprintf(stdout,"fputcSocket: %d\n",iret); - return 0; - } - else { - return len-=iret; - } - } - return 0; + int iret; + while(len) { + if(SOCKET_ERROR==(iret=send(s, buffer, len, 0))) + { + iret=WSAGetLastError (); + fprintf(stdout,"fputcSocket: %d\n",iret); + return 0; + } + else { + return len-=iret; + } + } + return 0; } char *fgetsSocket(int s, char *string) @@ -180,31 +180,31 @@ if (count == SOCKET_ERROR) { - printf("Error in fgetssocket"); - return NULL; + printf("Error in fgetssocket"); + return NULL; } if (count == 1) { - string[i] = buffer[0]; - - if (i == MAX_ASCII - 3) - { - count = 0; - string[++i] = '\n'; - string[++i] = '\0'; - } + string[i] = buffer[0]; + + if (i == MAX_ASCII - 3) + { + count = 0; + string[++i] = '\n'; + string[++i] = '\0'; + } } else { - if (i == 0) - return NULL; - else - { - string[i] = '\n'; - string[i + 1] = '\0'; // This is risky - return string; - } + if (i == 0) + return NULL; + else + { + string[i] = '\n'; + string[i + 1] = '\0'; // This is risky + return string; + } } @@ -250,44 +250,44 @@ int rc; if (istty) - { - if (GetConsoleMode (in, &old_flags)) - SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); - else - istty = 0; - } + { + if (GetConsoleMode (in, &old_flags)) + SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); + else + istty = 0; + } /* Need to read line one byte at time to avoid blocking, if not a tty, so always do it this way. */ count = 0; while (1) - { - DWORD dummy; - char one_char; - - rc = ReadFile (in, &one_char, 1, &dummy, NULL); - if (rc == 0) - break; - if (one_char == '\r') - { - /* CR is always followed by LF if reading from tty. */ - if (istty) - continue; - else - break; - } - if (one_char == '\n') - break; - /* Silently truncate password string if overly long. */ - if (count < sizeof (input) - 1) - input[count++] = one_char; - } + { + DWORD dummy; + char one_char; + + rc = ReadFile (in, &one_char, 1, &dummy, NULL); + if (rc == 0) + break; + if (one_char == '\r') + { + /* CR is always followed by LF if reading from tty. */ + if (istty) + continue; + else + break; + } + if (one_char == '\n') + break; + /* Silently truncate password string if overly long. */ + if (count < sizeof (input) - 1) + input[count++] = one_char; + } input[count] = '\0'; WriteFile (err, "\r\n", 2, &count, NULL); if (istty) - SetConsoleMode (in, old_flags); + SetConsoleMode (in, old_flags); if (rc) - return input; + return input; } return NULL; Modified: trunk/reactos/base/applications/network/ftp/ftp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ftp/ftp.c [iso-8859-1] Sun May 30 22:31:58 2010 @@ -345,7 +345,7 @@ cp = reply_string; while ((c = fgetcSocket(cin)) != '\n') { if (c == IAC) { /* handle telnet commands */ - switch (c = fgetcSocket(cin)) { + switch (fgetcSocket(cin)) { case WILL: case WONT: c = fgetcSocket(cin); @@ -745,7 +745,7 @@ long bytes = 0, hashbytes = HASHBYTES; // struct fd_set mask; - register int c, d; + register int c; struct timeval start, stop; // struct stat st; @@ -781,6 +781,7 @@ null();// oldintr = signal(SIGINT, abortrecv); if (strcmp(local, "-") && *local != '|') { #ifndef _WIN32 + register int d; // This whole thing is a problem... access Won't work on non-existent files if (access(local, 2) < 0) { char *dir = rindex(local, '/'); @@ -919,7 +920,7 @@ (*closefunc)(fout); return; } - errno = d = 0; + errno = 0; // while ((c = recv(din, buf, bufsize, 1)) > 0) { // if ((d = write(fileno(fout), buf, c)) != c) // if ((d = write(fileno(fout), buf, c)) != c) @@ -1106,10 +1107,10 @@ lostpeer(); } if (din && FD_ISSET(din, &mask)) { - while ((c = recv(din, buf, bufsize, 0)) > 0) + while (recv(din, buf, bufsize, 0) > 0) ; } - if ((c = getreply(0)) == ERROR && code == 552) { /* needed for nic style abort */ + if (getreply(0) == ERROR && code == 552) { /* needed for nic style abort */ if (data >= 0) { (void) close(data); data = -1; Modified: trunk/reactos/base/applications/network/nslookup/nslookup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/nslookup/nslookup.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/nslookup/nslookup.c [iso-8859-1] Sun May 30 22:31:58 2010 @@ -90,11 +90,7 @@ BOOL bOk = FALSE; /* Makes things easier when parsing the response packet. */ - UCHAR Header1, Header2; USHORT NumQuestions; - USHORT NumAnswers; - USHORT NumAuthority; - USHORT NumAdditional; USHORT Type; if( (strlen( pAddr ) + 1) > 255 ) return FALSE; @@ -198,12 +194,7 @@ if( !bOk ) goto cleanup; /* Start parsing the received packet. */ - Header1 = RecBuffer[2]; - Header2 = RecBuffer[3]; NumQuestions = ntohs( ((PSHORT)&RecBuffer[4])[0] ); - NumAnswers = ntohs( ((PSHORT)&RecBuffer[6])[0] ); - NumAuthority = ntohs( ((PUSHORT)&RecBuffer[8])[0] ); - NumAdditional = ntohs( ((PUSHORT)&RecBuffer[10])[0] ); k = 12; @@ -257,11 +248,10 @@ BOOL bOk = FALSE; /* Makes things easier when parsing the response packet. */ - UCHAR Header1, Header2; + UCHAR Header2; USHORT NumQuestions; USHORT NumAnswers; USHORT NumAuthority; - USHORT NumAdditional; USHORT Type; if( (strlen( pAddr ) + 1) > 255 ) return; @@ -368,19 +358,17 @@ ((PSHORT)&Buffer[i])[0] = htons( ClassNametoClassID( State.Class ) ); /* Ship off the request to the DNS server. */ - bOk = SendRequest( Buffer, + bOk = SendRequest( Buffer, BufferLength, RecBuffer, &RecBufferLength ); if( !bOk ) goto cleanup; /* Start parsing the received packet. */ - Header1 = RecBuffer[2]; Header2 = RecBuffer[3]; NumQuestions = ntohs( ((PSHORT)&RecBuffer[4])[0] ); NumAnswers = ntohs( ((PSHORT)&RecBuffer[6])[0] ); NumAuthority = ntohs( ((PUSHORT)&RecBuffer[8])[0] ); - NumAdditional = ntohs( ((PUSHORT)&RecBuffer[10])[0] ); Type = 0; /* Check the RCODE for failure. */
14 years, 8 months
1
0
0
0
[gschneider] 47459: Various application fixes by Jan Roeloffzen, bug #5182, part 2 fontview: remove unused variable kbswitch: remove unused variables magnify: remove unused variable mplay32: DWORD -> MCIERROR, tabs -> spaces eventvwr: remove unused variable
by gschneider@svn.reactos.org
Author: gschneider Date: Sun May 30 22:25:46 2010 New Revision: 47459 URL:
http://svn.reactos.org/svn/reactos?rev=47459&view=rev
Log: Various application fixes by Jan Roeloffzen, bug #5182, part 2 fontview: remove unused variable kbswitch: remove unused variables magnify: remove unused variable mplay32: DWORD -> MCIERROR, tabs -> spaces eventvwr: remove unused variable Modified: trunk/reactos/base/applications/fontview/fontview.c trunk/reactos/base/applications/kbswitch/kbswitch.c trunk/reactos/base/applications/magnify/magnifier.c trunk/reactos/base/applications/mplay32/mplay32.c trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c Modified: trunk/reactos/base/applications/fontview/fontview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/fontview…
============================================================================== --- trunk/reactos/base/applications/fontview/fontview.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/fontview/fontview.c [iso-8859-1] Sun May 30 22:25:46 2010 @@ -60,12 +60,9 @@ static void ErrorMsgBox(HWND hParent, DWORD dwCaptionID, DWORD dwMessageId, ...) { - HMODULE hModule; HLOCAL hMemCaption = NULL; HLOCAL hMemText = NULL; va_list args; - - hModule = GetModuleHandle(NULL); va_start(args, dwMessageId); FormatString(FORMAT_MESSAGE_ALLOCATE_BUFFER, Modified: trunk/reactos/base/applications/kbswitch/kbswitch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
============================================================================== --- trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/kbswitch/kbswitch.c [iso-8859-1] Sun May 30 22:25:46 2010 @@ -33,7 +33,6 @@ HDC hdc, hdcsrc; HBITMAP hBitmap, hBmpNew, hBmpOld; RECT rect; - DWORD bkColor, bkText; HFONT hFontOld, hFont = NULL; ICONINFO IconInfo; HICON hIcon = NULL; @@ -63,8 +62,8 @@ 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); Modified: trunk/reactos/base/applications/magnify/magnifier.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/magnify/…
============================================================================== --- trunk/reactos/base/applications/magnify/magnifier.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/magnify/magnifier.c [iso-8859-1] Sun May 30 22:25:46 2010 @@ -295,7 +295,7 @@ // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - int wmId, wmEvent; + int wmId; switch (message) { @@ -354,7 +354,6 @@ break; case WM_COMMAND: wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { Modified: trunk/reactos/base/applications/mplay32/mplay32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mplay32/…
============================================================================== --- trunk/reactos/base/applications/mplay32/mplay32.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mplay32/mplay32.c [iso-8859-1] Sun May 30 22:25:46 2010 @@ -407,7 +407,7 @@ MCI_PLAY_PARMS mciPlay; TCHAR szLocalFileName[MAX_PATH]; UINT FileType; - DWORD dwError; + MCIERROR mciError; if (lpFileName == NULL) { @@ -449,14 +449,14 @@ SetTimer(hwnd, IDT_PLAYTIMER, 100, (TIMERPROC) PlayTimerProc); - dwError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0); + mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_SEEK_TO_START, 0); mciPlay.dwCallback = (DWORD_PTR)hwnd; mciPlay.dwFrom = 0; mciPlay.dwTo = MaxFilePos; - dwError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)&mciPlay); - if (dwError != 0) + mciError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD_PTR)&mciPlay); + if (mciError != 0) { MessageBox(hwnd, _T("Can't play!"), NULL, MB_OK); } @@ -641,12 +641,12 @@ break; case IDM_ABOUT: - { + { HICON mplayIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MAIN)); ShellAbout(hwnd, szAppTitle, 0, mplayIcon); - DeleteObject(mplayIcon); - break; - } + DeleteObject(mplayIcon); + break; + } case IDM_EXIT: PostMessage(hwnd, WM_CLOSE, 0, 0); return 0; Modified: trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] Sun May 30 22:25:46 2010 @@ -506,7 +506,6 @@ DWORD dwRead, dwNeeded, dwThisRecord, dwTotalRecords = 0, dwCurrentRecord = 1, dwRecordsToRead = 0, dwFlags; LPWSTR lpSourceName; LPWSTR lpComputerName; - LPWSTR lpEventStr; LPWSTR lpData; BOOL bResult = TRUE; /* Read succeeded. */ @@ -608,9 +607,6 @@ // This ist the data section of the current event lpData = (LPWSTR)((LPBYTE)pevlr + pevlr->DataOffset); - - // This is the text of the current event - lpEventStr = (LPWSTR)((LPBYTE)pevlr + pevlr->StringOffset); // Compute the event type EventTimeToSystemTime(pevlr->TimeWritten, &time);
14 years, 8 months
1
0
0
0
[gschneider] 47458: Various application fixes by Jan Roeloffzen, bug #5182, part 1 Notepad: remove unused variable, tabs -> spaces Regedit: remove unused variable Calc: dword->bool, remove unused variables, tabs -> spaces
by gschneider@svn.reactos.org
Author: gschneider Date: Sun May 30 22:19:21 2010 New Revision: 47458 URL:
http://svn.reactos.org/svn/reactos?rev=47458&view=rev
Log: Various application fixes by Jan Roeloffzen, bug #5182, part 1 Notepad: remove unused variable, tabs -> spaces Regedit: remove unused variable Calc: dword->bool, remove unused variables, tabs -> spaces Modified: trunk/reactos/base/applications/calc/utl.c trunk/reactos/base/applications/calc/winmain.c trunk/reactos/base/applications/notepad/dialog.c trunk/reactos/base/applications/regedit/edit.c Modified: trunk/reactos/base/applications/calc/utl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/utl…
============================================================================== --- trunk/reactos/base/applications/calc/utl.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/utl.c [iso-8859-1] Sun May 30 22:19:21 2010 @@ -2,7 +2,6 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base) { - TCHAR *ptr, *dst; calc_number_t tmp; int width; @@ -21,9 +20,12 @@ /* calculate the width of integer number */ width = (rpn->f==0) ? 1 : (int)log10(fabs(rpn->f))+1; if (calc.sci_out == TRUE || width > MAX_LD_WIDTH || width < -MAX_LD_WIDTH) - ptr = buffer + _stprintf(buffer, TEXT("%#e"), rpn->f); + _stprintf(buffer, TEXT("%#e"), rpn->f); else { + TCHAR *ptr, *dst; + ptr = buffer + _stprintf(buffer, TEXT("%#*.*f"), width, ((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f); + /* format sring ensures there is a '.': */ dst = _tcschr(buffer, TEXT('.')); while (--ptr > dst) if (*ptr != TEXT('0')) Modified: trunk/reactos/base/applications/calc/winmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/win…
============================================================================== --- trunk/reactos/base/applications/calc/winmain.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/winmain.c [iso-8859-1] Sun May 30 22:19:21 2010 @@ -861,18 +861,18 @@ n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCURSEL, 0, 0); if (n == (DWORD)-1) return TRUE; - PostMessage(GetParent(hWnd), WM_LOAD_STAT, (WPARAM)n, 0); + PostMessage(GetParent(hWnd), WM_LOAD_STAT, (WPARAM)n, 0); return TRUE; case IDC_BUTTON_CD: n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCURSEL, 0, 0); if (n == (DWORD)-1) return TRUE; - SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_DELETESTRING, (WPARAM)n, 0); + SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_DELETESTRING, (WPARAM)n, 0); update_n_stats_items(hWnd, buffer); delete_stat_item(n); return TRUE; case IDC_BUTTON_CAD: - SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_RESETCONTENT, 0, 0); + SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_RESETCONTENT, 0, 0); clean_stat_list(); update_n_stats_items(hWnd, buffer); return TRUE; @@ -910,20 +910,20 @@ static void CopyMemToClipboard(void *ptr) { if(OpenClipboard(NULL)) { - HGLOBAL clipbuffer; - TCHAR *buffer; - - EmptyClipboard(); - clipbuffer = GlobalAlloc(GMEM_DDESHARE, (_tcslen(ptr)+1)*sizeof(TCHAR)); - buffer = (TCHAR *)GlobalLock(clipbuffer); - _tcscpy(buffer, ptr); - GlobalUnlock(clipbuffer); + HGLOBAL clipbuffer; + TCHAR *buffer; + + EmptyClipboard(); + clipbuffer = GlobalAlloc(GMEM_DDESHARE, (_tcslen(ptr)+1)*sizeof(TCHAR)); + buffer = (TCHAR *)GlobalLock(clipbuffer); + _tcscpy(buffer, ptr); + GlobalUnlock(clipbuffer); #ifdef UNICODE - SetClipboardData(CF_UNICODETEXT,clipbuffer); + SetClipboardData(CF_UNICODETEXT,clipbuffer); #else - SetClipboardData(CF_TEXT,clipbuffer); + SetClipboardData(CF_TEXT,clipbuffer); #endif - CloseClipboard(); + CloseClipboard(); } } @@ -942,16 +942,16 @@ char *buffer = NULL; if (OpenClipboard(NULL)) { - HANDLE hData = GetClipboardData(CF_TEXT); + HANDLE hData = GetClipboardData(CF_TEXT); char *fromClipboard; if (hData != NULL) { fromClipboard = (char *)GlobalLock(hData); if (strlen(fromClipboard)) - buffer = _strupr(_strdup(fromClipboard)); - GlobalUnlock( hData ); - } - CloseClipboard(); + buffer = _strupr(_strdup(fromClipboard)); + GlobalUnlock( hData ); + } + CloseClipboard(); } return buffer; } @@ -1110,20 +1110,20 @@ { TCHAR text[64]; HMENU hMenu = CreatePopupMenu(); - DWORD idm; + BOOL idm; LoadString(calc.hInstance, IDS_QUICKHELP, text, SIZEOF(text)); AppendMenu(hMenu, MF_STRING | MF_ENABLED, IDM_HELP_HELP, text); - idm = (DWORD)TrackPopupMenu(hMenu, - TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD | TPM_RIGHTBUTTON, - LOWORD(lp), - HIWORD(lp), - 0, - hWnd, - NULL); + idm = TrackPopupMenu( hMenu, + TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD | TPM_RIGHTBUTTON, + LOWORD(lp), + HIWORD(lp), + 0, + hWnd, + NULL); DestroyMenu(hMenu); #ifndef DISABLE_HTMLHELP_SUPPORT - if (idm != 0) { + if (idm) { HH_POPUP popup; memset(&popup, 0, sizeof(popup)); @@ -1139,6 +1139,8 @@ popup.idString = GetWindowLongPtr((HWND)wp, GWL_ID); HtmlHelp((HWND)wp, HTMLHELP_PATH("/popups.txt"), HH_DISPLAY_TEXT_POPUP, (DWORD_PTR)&popup); } +#else + (void)idm; #endif } Modified: trunk/reactos/base/applications/notepad/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Sun May 30 22:19:21 2010 @@ -400,7 +400,6 @@ { TCHAR szText[128]; HWND hCombo; - OFNOTIFY *pNotify; UNREFERENCED_PARAMETER(wParam); @@ -440,15 +439,13 @@ case WM_NOTIFY: if (((NMHDR *) lParam)->code == CDN_FILEOK) { - pNotify = (OFNOTIFY *) lParam; - hCombo = GetDlgItem(hDlg, ID_ENCODING); - if (hCombo) - Globals.iEncoding = (int) SendMessage(hCombo, CB_GETCURSEL, 0, 0); + if (hCombo) + Globals.iEncoding = (int) SendMessage(hCombo, CB_GETCURSEL, 0, 0); hCombo = GetDlgItem(hDlg, ID_EOLN); - if (hCombo) - Globals.iEoln = (int) SendMessage(hCombo, CB_GETCURSEL, 0, 0); + if (hCombo) + Globals.iEoln = (int) SendMessage(hCombo, CB_GETCURSEL, 0, 0); } break; } @@ -808,11 +805,11 @@ TCHAR szText[32]; switch(uMsg) { - case WM_INITDIALOG: + case WM_INITDIALOG: hTextBox = GetDlgItem(hwndDialog, ID_LINENUMBER); - _sntprintf(szText, SIZEOF(szText), _T("%d"), lParam); + _sntprintf(szText, SIZEOF(szText), _T("%d"), lParam); SetWindowText(hTextBox, szText); - break; + break; case WM_COMMAND: if (HIWORD(wParam) == BN_CLICKED) { @@ -823,11 +820,11 @@ EndDialog(hwndDialog, _ttoi(szText)); bResult = TRUE; } - else if (LOWORD(wParam) == IDCANCEL) - { + else if (LOWORD(wParam) == IDCANCEL) + { EndDialog(hwndDialog, 0); bResult = TRUE; - } + } } break; } @@ -862,7 +859,7 @@ Globals.hMainWnd, DIALOG_GoTo_DialogProc, nLine); if (nLine >= 1) - { + { for (i = 0; pszText[i] && (nLine > 1) && (i < nLength - 1); i++) { if (pszText[i] == '\n') @@ -870,8 +867,8 @@ } SendMessage(Globals.hEdit, EM_SETSEL, i, i); SendMessage(Globals.hEdit, EM_SCROLLCARET, 0, 0); - } - HeapFree(GetProcessHeap(), 0, pszText); + } + HeapFree(GetProcessHeap(), 0, pszText); } VOID DIALOG_StatusBarUpdateCaretPos(VOID) Modified: trunk/reactos/base/applications/regedit/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/edit.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/edit.c [iso-8859-1] Sun May 30 22:19:21 2010 @@ -276,7 +276,6 @@ { WNDPROC oldproc; HWND hwndValue; - int len; TCHAR ValueString[32]; LPTSTR Remainder; DWORD Base; @@ -319,7 +318,7 @@ dwordEditMode = EDIT_MODE_HEX; if ((hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA))) { - if ((len = GetWindowTextLength(hwndValue))) + if (GetWindowTextLength(hwndValue)) { if (GetWindowText(hwndValue, ValueString, 32)) { @@ -339,7 +338,7 @@ dwordEditMode = EDIT_MODE_DEC; if ((hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA))) { - if ((len = GetWindowTextLength(hwndValue))) + if (GetWindowTextLength(hwndValue)) { if (GetWindowText(hwndValue, ValueString, 32)) { @@ -356,7 +355,7 @@ case IDOK: if ((hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA))) { - if ((len = GetWindowTextLength(hwndValue))) + if (GetWindowTextLength(hwndValue)) { if (!GetWindowText(hwndValue, ValueString, 32)) {
14 years, 8 months
1
0
0
0
[jmorlan] 47457: [FORMATTING] Standardize win32csr to 4-space indents. Based on a patch by Adam Kachwalla [Bug 5380]. No code changes.
by jmorlan@svn.reactos.org
Author: jmorlan Date: Sun May 30 22:00:17 2010 New Revision: 47457 URL:
http://svn.reactos.org/svn/reactos?rev=47457&view=rev
Log: [FORMATTING] Standardize win32csr to 4-space indents. Based on a patch by Adam Kachwalla [Bug 5380]. No code changes. Modified: trunk/reactos/subsystems/win32/csrss/win32csr/alias.c trunk/reactos/subsystems/win32/csrss/win32csr/appswitch.c trunk/reactos/subsystems/win32/csrss/win32csr/conio.c trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c trunk/reactos/subsystems/win32/csrss/win32csr/handle.c trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/subsystems/win32/csrss/win32csr/alias.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/appswitch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/desktopbg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
14 years, 8 months
1
0
0
0
[ekohl] 47456: [NTOSKRNL] Make NtDuplicateToken fail if the caller tries to create a new impersonation token with a raised impersonation level. This fixes a winetest.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun May 30 21:46:02 2010 New Revision: 47456 URL:
http://svn.reactos.org/svn/reactos?rev=47456&view=rev
Log: [NTOSKRNL] Make NtDuplicateToken fail if the caller tries to create a new impersonation token with a raised impersonation level. This fixes a winetest. Modified: trunk/reactos/ntoskrnl/se/token.c Modified: trunk/reactos/ntoskrnl/se/token.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=47…
============================================================================== --- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Sun May 30 21:46:02 2010 @@ -1844,39 +1844,61 @@ PreviousMode, (PVOID*)&Token, NULL); + if (!NT_SUCCESS(Status)) + { + SepReleaseSecurityQualityOfService(CapturedSecurityQualityOfService, + PreviousMode, + FALSE); + return Status; + } + + /* + * Fail, if the original token is an impersonation token and the caller + * tries to raise the impersonation level of the new token above the + * impersonation level of the original token. + */ + if (Token->TokenType == TokenImpersonation) + { + if (QoSPresent && + CapturedSecurityQualityOfService->ImpersonationLevel >Token->ImpersonationLevel) + { + ObDereferenceObject(Token); + SepReleaseSecurityQualityOfService(CapturedSecurityQualityOfService, + PreviousMode, + FALSE); + return STATUS_BAD_IMPERSONATION_LEVEL; + } + } + + Status = SepDuplicateToken(Token, + ObjectAttributes, + EffectiveOnly, + TokenType, + (QoSPresent ? CapturedSecurityQualityOfService->ImpersonationLevel : SecurityAnonymous), + PreviousMode, + &NewToken); + + ObDereferenceObject(Token); + if (NT_SUCCESS(Status)) { - Status = SepDuplicateToken(Token, - ObjectAttributes, - EffectiveOnly, - TokenType, - (QoSPresent ? CapturedSecurityQualityOfService->ImpersonationLevel : SecurityAnonymous), - PreviousMode, - &NewToken); - - ObDereferenceObject(Token); - + Status = ObInsertObject((PVOID)NewToken, + NULL, + DesiredAccess, + 0, + NULL, + &hToken); if (NT_SUCCESS(Status)) { - Status = ObInsertObject((PVOID)NewToken, - NULL, - DesiredAccess, - 0, - NULL, - &hToken); - - if (NT_SUCCESS(Status)) + _SEH2_TRY { - _SEH2_TRY - { - *NewTokenHandle = hToken; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; + *NewTokenHandle = hToken; } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; } }
14 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200