svn rev #25337: trunk/src/windows/lib/

hartmans@MIT.EDU hartmans at MIT.EDU
Fri Oct 14 10:40:32 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25337
Commit By: hartmans
Log Message:
Fixed some warnings in libwin

Signed-off-by: Alexey Melnikov <aamelnikov at gmail.com>


Changed Files:
U   trunk/src/windows/lib/gic.c
U   trunk/src/windows/lib/registry.c
U   trunk/src/windows/lib/vardlg.c
Modified: trunk/src/windows/lib/gic.c
===================================================================
--- trunk/src/windows/lib/gic.c	2011-10-14 14:40:28 UTC (rev 25336)
+++ trunk/src/windows/lib/gic.c	2011-10-14 14:40:32 UTC (rev 25337)
@@ -103,7 +103,7 @@
 	for (n = 0 ; n < gd->num_prompts ; n++) {
 		Edit_GetText(GetDlgItem(hwnd, id), gd->prompts[n].reply->data,
 			gd->prompts[n].reply->length);
-		gd->prompts[n].reply->length = strlen(gd->prompts[n].reply->data);
+		gd->prompts[n].reply->length = (unsigned)strlen(gd->prompts[n].reply->data);
 		id += 2;
 	}
 
@@ -113,7 +113,7 @@
 /*
  * The dialog callback.
  */
-static BOOL CALLBACK
+static INT_PTR CALLBACK
 gic_dialog(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
 	switch (message) {

Modified: trunk/src/windows/lib/registry.c
===================================================================
--- trunk/src/windows/lib/registry.c	2011-10-14 14:40:28 UTC (rev 25336)
+++ trunk/src/windows/lib/registry.c	2011-10-14 14:40:32 UTC (rev 25337)
@@ -116,7 +116,7 @@
 {
 	DWORD   err;
 
-	err = RegSetValueEx(hkey, sub, 0, REG_SZ, (BYTE *)x, strlen(x) + 1);
+	err = RegSetValueEx(hkey, sub, 0, REG_SZ, (BYTE *)x, (DWORD)strlen(x) + 1);
 	if (err != ERROR_SUCCESS)
 		return -1;
 

Modified: trunk/src/windows/lib/vardlg.c
===================================================================
--- trunk/src/windows/lib/vardlg.c	2011-10-14 14:40:28 UTC (rev 25336)
+++ trunk/src/windows/lib/vardlg.c	2011-10-14 14:40:32 UTC (rev 25337)
@@ -45,12 +45,12 @@
 	return 4;
 }
 
-static int
+static size_t
 ADD_UNICODE_STRING(unsigned char *p, const char *s)
 {
 	WORD *w;
-	int i;
-	int len;
+	size_t i;
+	size_t len;
 
 	w = (WORD *)p;
 
@@ -64,7 +64,7 @@
 
 #define DWORD_ALIGN(p) { while ((DWORD)p % 4) *p++ = 0x00; }
 
-static int
+static size_t
 ADD_DLGTEMPLATE(unsigned char *dlg, short x, short y, short cx, short cy,
 		const char *caption, const char *fontname, WORD fontsize,
 		WORD n)
@@ -107,7 +107,7 @@
 	return (p - dlg);
 }
 
-static int
+static size_t
 ADD_DLGITEM(unsigned char *dlg, short x, short y, short cx, short cy,
 	    const char *label, WORD id, WORD type, DWORD style)
 {
@@ -276,7 +276,7 @@
 	hdc = GetDC(GetDlgItem(hwnd, cid)); /* assume one label is the same as all the others */
 
 	for (n = 0 ; n < num_prompts ; n++) {
-		GetTextExtentPoint32(hdc, prompts[n].prompt, strlen(prompts[n].prompt), &csize);
+		GetTextExtentPoint32(hdc, prompts[n].prompt, (int)strlen(prompts[n].prompt), &csize);
 		if (csize.cx > maxsize.cx)
 			maxsize.cx = csize.cx;
 		if (csize.cy > maxsize.cy)
@@ -352,7 +352,7 @@
 
 		hdc = GetDC(GetDlgItem(hwnd, id));
 
-		GetTextExtentExPoint(hdc, p, strlen(p), cx, &nFit,
+		GetTextExtentExPoint(hdc, p, (int)strlen(p), cx, &nFit,
 			pDx, &csize);
 
 		banner_y += csize.cy;




More information about the cvs-krb5 mailing list