[ros-diffs] [cwittich] 22893: fixed some warnings (msvc /W4)

cwittich at svn.reactos.org cwittich at svn.reactos.org
Thu Jul 6 18:26:40 CEST 2006


Author: cwittich
Date: Thu Jul  6 20:26:40 2006
New Revision: 22893

URL: http://svn.reactos.org/svn/reactos?rev=22893&view=rev
Log:
fixed some warnings (msvc /W4)

Modified:
    trunk/reactos/base/applications/devmgr/devmgr.c
    trunk/reactos/base/applications/winver/winver.c

Modified: trunk/reactos/base/applications/devmgr/devmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgr/devmgr.c?rev=22893&r1=22892&r2=22893&view=diff
==============================================================================
--- trunk/reactos/base/applications/devmgr/devmgr.c (original)
+++ trunk/reactos/base/applications/devmgr/devmgr.c Thu Jul  6 20:26:40 2006
@@ -131,8 +131,8 @@
 		if (rc == ERROR_SUCCESS)
 		{
 			InsertIntoListView(i,ClassDescription,ClassName);
-			TextOut(hDC, 200, 40, empty, strlen(empty));
-			TextOut(hDC, 200, 40, ClassDescription, strlen(ClassDescription));
+			TextOut(hDC, 200, 40, empty, (int) strlen(empty));
+			TextOut(hDC, 200, 40, ClassDescription, (int) strlen(ClassDescription));
 			_tprintf(_T("%d %s (%s)\n"), i, ClassName, ClassDescription);
 		}
 		else
@@ -183,8 +183,8 @@
 			{
 				_tprintf(_T("- %s\n"), PropertyBuffer);
 				InsertIntoListView(0,PropertyBuffer," ");
-				TextOut(hDC, 200, 40, empty, strlen(empty));
-				TextOut(hDC, 200, 40, PropertyBuffer, strlen(PropertyBuffer));
+				TextOut(hDC, 200, 40, empty, (int) strlen(empty));
+				TextOut(hDC, 200, 40, PropertyBuffer, (int) strlen(PropertyBuffer));
 			}
 			else
 				_tprintf(_T("SetupDiGetDeviceRegistryProperty() failed with status 0x%lx\n"), GetLastError());
@@ -239,16 +239,16 @@
 			_tprintf(_T("%s\n"), DisplayName);
 			sprintf(temp,"%s%s",LevelSpaces,DisplayName);
 			InsertIntoListView(0,temp," ");
-			TextOut(hDC, 200, 40, empty, strlen(empty));
-			TextOut(hDC, 200, 40, DisplayName, strlen(DisplayName));
+			TextOut(hDC, 200, 40, empty, (int) strlen(empty));
+			TextOut(hDC, 200, 40, DisplayName, (int) strlen(DisplayName));
 		}
 		else
 		{
 			_tprintf(_T("(unknown device)\n"));
 			sprintf(temp,"%s%s",LevelSpaces,"(unknown device)");
 			InsertIntoListView(0,temp," ");
-			TextOut(hDC, 200, 40, empty, strlen(empty));
-			TextOut(hDC, 200, 40, "(unknown device)", strlen("(unknown device)"));
+			TextOut(hDC, 200, 40, empty, (int) strlen(empty));
+			TextOut(hDC, 200, 40, "(unknown device)", (int) strlen("(unknown device)"));
 		}
 		cr = ListSubNodes(child, Level + 1);
 		if (cr != CR_SUCCESS)
@@ -328,8 +328,8 @@
 		if (SetupDiGetDeviceInterfaceDetail(hDevInfo, &DeviceInterfaceData, DeviceInterfaceDetailData, sizeof(Buffer), NULL, NULL))
 		{
 			_tprintf(_T("- device %-2ld: %s\n"), i, DeviceInterfaceDetailData->DevicePath);
-			TextOut(hDC, 200, 40, empty, strlen(empty));
-			TextOut(hDC, 200, 40, DeviceInterfaceDetailData->DevicePath, strlen(DeviceInterfaceDetailData->DevicePath));
+			TextOut(hDC, 200, 40, empty, (int) strlen(empty));
+			TextOut(hDC, 200, 40, DeviceInterfaceDetailData->DevicePath, (int) strlen(DeviceInterfaceDetailData->DevicePath));
 			InsertIntoListView(i,DeviceInterfaceDetailData->DevicePath," ");
 		}
 		else
@@ -481,7 +481,7 @@
       InitListView();
 
       CreateButtons(g_hInst, hWnd);
-      TextOut(hDC, 200, 40, empty, strlen(empty));
+      TextOut(hDC, 200, 40, empty, (int) strlen(empty));
       break;
 
 
@@ -657,7 +657,7 @@
     }
     else
     	item.pszText = "";
-    item.cchTextMax = _tcslen(item.pszText);
+    item.cchTextMax = (int) _tcslen(item.pszText);
     if (item.cchTextMax == 0)
         item.pszText = LPSTR_TEXTCALLBACK;
     item.iImage = 0;

Modified: trunk/reactos/base/applications/winver/winver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winver/winver.c?rev=22893&r1=22892&r2=22893&view=diff
==============================================================================
--- trunk/reactos/base/applications/winver/winver.c (original)
+++ trunk/reactos/base/applications/winver/winver.c Thu Jul  6 20:26:40 2006
@@ -3,6 +3,10 @@
 
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
   static const WCHAR szROS[] = { 'R','e','a','c','t','O','S','\n',0 };
+  UNREFERENCED_PARAMETER(lpCmdLine);
+  UNREFERENCED_PARAMETER(nCmdShow);
+  UNREFERENCED_PARAMETER(hPrevInstance);
+  UNREFERENCED_PARAMETER(hInstance);
   ShellAbout(0, szROS, 0, 0);
   return 1;
 }




More information about the Ros-diffs mailing list