svn rev #25255: trunk/src/windows/leashdll/

hartmans@MIT.EDU hartmans at MIT.EDU
Wed Sep 28 16:55:10 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25255
Commit By: hartmans
Log Message:
Eliminated lots of warnings about not typecasting char * to wchar_t *

Fixed various warnings in leashdll

Unused variables, dropping of const from "const char *", etc.

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


Changed Files:
U   trunk/src/windows/leashdll/Makefile.in
U   trunk/src/windows/leashdll/krb5routines.c
U   trunk/src/windows/leashdll/lshfunc.c
Modified: trunk/src/windows/leashdll/Makefile.in
===================================================================
--- trunk/src/windows/leashdll/Makefile.in	2011-09-28 20:55:06 UTC (rev 25254)
+++ trunk/src/windows/leashdll/Makefile.in	2011-09-28 20:55:10 UTC (rev 25255)
@@ -56,7 +56,7 @@
 WINDLLFLAGS = /nologo /dll /incremental:no /release $(LOPTS)
 
 
-DEFINES = -DUNICODE -D_UNICODE -DWINSOCK -DWIN32 -DWINDOWS -DNO_KRB4
+DEFINES = -DWINSOCK -DWIN32 -DWINDOWS -DNO_KRB4
 !ifdef NODEBUG
 DEFINES = $(DEFINES)
 !else

Modified: trunk/src/windows/leashdll/krb5routines.c
===================================================================
--- trunk/src/windows/leashdll/krb5routines.c	2011-09-28 20:55:06 UTC (rev 25254)
+++ trunk/src/windows/leashdll/krb5routines.c	2011-09-28 20:55:10 UTC (rev 25255)
@@ -1272,7 +1272,8 @@
     LPWORD lpw;
     LPWSTR lpwsz;
     LRESULT ret;
-    int nchar, i, pwid;
+    int nchar, i;
+    size_t pwid;
 
     hgbl = GlobalAlloc(GMEM_ZEROINIT, 4096);
     if (!hgbl)
@@ -1460,7 +1461,7 @@
 multi_field_dialog(HWND hParent, char * preface, int n, struct textField tb[])
 {
 	extern HINSTANCE hLeashInst;
-    int maxwidth = 0;
+    size_t maxwidth = 0;
     int numlines = 0;
     int len;
     char * plines[16], *p = preface ? preface : "";

Modified: trunk/src/windows/leashdll/lshfunc.c
===================================================================
--- trunk/src/windows/leashdll/lshfunc.c	2011-09-28 20:55:06 UTC (rev 25254)
+++ trunk/src/windows/leashdll/lshfunc.c	2011-09-28 20:55:10 UTC (rev 25255)
@@ -492,7 +492,6 @@
     int displayErrors
     )
 {
-    LPCSTR  functionName;
     char    aname[ANAME_SZ];
     char    inst[INST_SZ];
     char    realm[REALM_SZ];
@@ -600,7 +599,6 @@
     }
 #endif /* NO_AFS */
 
- cleanup:
     return leash_error_message("Ticket initialization failed.",
                                rcL,
                                rc5, rcA, 0,
@@ -2698,7 +2696,7 @@
 acquire_tkt_send_msg(krb5_context ctx, const char * title,
 		     const char * ccachename,
 		     krb5_principal desiredKrb5Principal,
-		     const char * out_ccname, int out_cclen)
+		     char * out_ccname, int out_cclen)
 {
     krb5_error_code 	err;
     HWND    	        hNetIdMgr;
@@ -2865,7 +2863,7 @@
     GetEnvironmentVariable("KRB5CCNAME", ccachename, sizeof(ccachename));
     gle = GetLastError();
     if ( ((gle == ERROR_ENVVAR_NOT_FOUND) || !ccachename[0]) && context ) {
-        char * ccdef = pkrb5_cc_default_name(ctx);
+        const char * ccdef = pkrb5_cc_default_name(ctx);
 	SetEnvironmentVariable("KRB5CCNAME", ccdef ? ccdef : NULL);
 	GetEnvironmentVariable("KRB5CCNAME", ccachename, sizeof(ccachename));
     }
@@ -2897,7 +2895,7 @@
             krb5_principal princ = NULL;
 	    char *mslsa_principal = NULL;
             char ms_realm[128] = "", *def_realm = NULL, *r;
-            int i;
+            size_t i;
 
             if (code = pkrb5_cc_resolve(ctx, "MSLSA:", &mslsa_ccache))
                 goto cleanup;
@@ -2984,7 +2982,7 @@
     GetEnvironmentVariable("KRB5CCNAME", ccachename, sizeof(ccachename));
     gle = GetLastError();
     if ( ((gle == ERROR_ENVVAR_NOT_FOUND) || !ccachename[0]) && context ) {
-        char * ccdef = pkrb5_cc_default_name(ctx);
+        const char * ccdef = pkrb5_cc_default_name(ctx);
 	SetEnvironmentVariable("KRB5CCNAME", ccdef ? ccdef : NULL);
 	GetEnvironmentVariable("KRB5CCNAME", ccachename, sizeof(ccachename));
     }




More information about the cvs-krb5 mailing list