svn rev #21590: branches/mskrb-integ/src/ include/krb5/ kdc/ lib/gssapi/krb5/ ...

lhoward@MIT.EDU lhoward at MIT.EDU
Thu Dec 25 17:43:45 EST 2008


http://src.mit.edu/fisheye/changelog/krb5/?cs=21590
Commit By: lhoward
Log Message:
Fix some warnings



Changed Files:
U   branches/mskrb-integ/src/include/krb5/krb5.hin
U   branches/mskrb-integ/src/kdc/kdc_authdata.c
U   branches/mskrb-integ/src/lib/gssapi/krb5/accept_sec_context.c
U   branches/mskrb-integ/src/lib/krb5/krb/chk_trans.c
U   branches/mskrb-integ/src/lib/krb5/krb/gc_frm_kdc.c
U   branches/mskrb-integ/src/lib/krb5/krb/mk_cred.c
U   branches/mskrb-integ/src/lib/krb5/krb/rd_rep.c
U   branches/mskrb-integ/src/lib/krb5/krb/walk_rtree.c
Modified: branches/mskrb-integ/src/include/krb5/krb5.hin
===================================================================
--- branches/mskrb-integ/src/include/krb5/krb5.hin	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/include/krb5/krb5.hin	2008-12-25 22:43:41 UTC (rev 21590)
@@ -1583,7 +1583,7 @@
 	(krb5_context,
 		krb5_auth_context,
 		const krb5_data *,
-		krb5_int32 *);
+		krb5_ui_4 *);
 krb5_error_code KRB5_CALLCONV krb5_mk_error
 	(krb5_context,
 		const krb5_error *,

Modified: branches/mskrb-integ/src/kdc/kdc_authdata.c
===================================================================
--- branches/mskrb-integ/src/kdc/kdc_authdata.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/kdc/kdc_authdata.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -337,8 +337,12 @@
     for (i = 0; in_authdata[i] != NULL; i++)
 	;
 
-    authdata = (krb5_authdata **)realloc(*out_authdata,
-	((nadata + i + 1) * sizeof(krb5_authdata *)));
+    if (authdata == NULL) {
+	authdata = (krb5_authdata **)calloc(i + 1, sizeof(krb5_authdata *));
+    } else {
+	authdata = (krb5_authdata **)realloc(authdata,
+	    ((nadata + i + 1) * sizeof(krb5_authdata *)));
+    }
     if (authdata == NULL)
 	return ENOMEM;
 
@@ -573,16 +577,16 @@
 	    if (request->msg_type != KRB5_AS_REQ)
 		continue;
 
-	    code = asys->handle_authdata.v0(context, client, req_pkt,
-					    request, enc_tkt_reply);
+	    code = (*asys->handle_authdata.v0)(context, client, req_pkt,
+					       request, enc_tkt_reply);
 	    break;
 	case AUTHDATA_SYSTEM_V1:
-	    code = asys->handle_authdata.v1(context, flags,
-					    client, server, krbtgt,
-					    client_key, server_key,
-					    req_pkt, request, for_user_princ,
-					    enc_tkt_request,
-					    enc_tkt_reply);
+	    code = (*asys->handle_authdata.v1)(context, flags,
+					      client, server, krbtgt,
+					      client_key, server_key,
+					      req_pkt, request, for_user_princ,
+					      enc_tkt_request,
+					      enc_tkt_reply);
 	    break;
 	default:
 	    code = 0;

Modified: branches/mskrb-integ/src/lib/gssapi/krb5/accept_sec_context.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/krb5/accept_sec_context.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/lib/gssapi/krb5/accept_sec_context.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -261,7 +261,7 @@
    krb5_gss_ctx_id_rec *ctx = 0;
    krb5_timestamp now;
    krb5_principal name = NULL;
-   krb5_int32 nonce = 0;
+   krb5_ui_4 nonce = 0;
    krb5_data ap_rep;
    OM_uint32 major_status = GSS_S_FAILURE;
 

Modified: branches/mskrb-integ/src/lib/krb5/krb/chk_trans.c
===================================================================
--- branches/mskrb-integ/src/lib/krb5/krb/chk_trans.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/lib/krb5/krb/chk_trans.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -137,7 +137,7 @@
 }
 
 static krb5_error_code
-maybe_join (krb5_data *last, krb5_data *buf, int bufsiz)
+maybe_join (krb5_data *last, krb5_data *buf, size_t bufsiz)
 {
     if (buf->length == 0)
 	return 0;

Modified: branches/mskrb-integ/src/lib/krb5/krb/gc_frm_kdc.c
===================================================================
--- branches/mskrb-integ/src/lib/krb5/krb/gc_frm_kdc.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/lib/krb5/krb/gc_frm_kdc.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -932,7 +932,7 @@
 	     */
 	    if (old_use_conf_ktypes || context->tgs_ktype_count == 0)
 		goto cleanup;
-	    for (i = 0; i < context->tgs_ktype_count; i++) {
+	    for (i = 0; i < (signed)context->tgs_ktype_count; i++) {
 		if ((*out_cred)->keyblock.enctype == context->tgs_ktypes[i]) {
 		    /* Found an allowable etype, so we're done */
 		    goto cleanup;

Modified: branches/mskrb-integ/src/lib/krb5/krb/mk_cred.c
===================================================================
--- branches/mskrb-integ/src/lib/krb5/krb/mk_cred.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/lib/krb5/krb/mk_cred.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -174,13 +174,15 @@
     /*
      * Allocate memory for a NULL terminated list of tickets.
      */
-    for (ncred = 0; ppcreds[ncred]; ncred++);
+    for (ncred = 0; ppcreds[ncred]; ncred++)
+	;
 
     if ((pcred = (krb5_cred *)calloc(1, sizeof(krb5_cred))) == NULL) 
         return ENOMEM;
 
     if ((pcred->tickets 
-	 = (krb5_ticket **)calloc(ncred+1, sizeof(krb5_ticket *))) == NULL) {
+	 = (krb5_ticket **)calloc((size_t)ncred+1,
+				  sizeof(krb5_ticket *))) == NULL) {
 	free(pcred);
 	return ENOMEM;
     }

Modified: branches/mskrb-integ/src/lib/krb5/krb/rd_rep.c
===================================================================
--- branches/mskrb-integ/src/lib/krb5/krb/rd_rep.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/lib/krb5/krb/rd_rep.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -144,7 +144,7 @@
 
 krb5_error_code KRB5_CALLCONV
 krb5_rd_rep_dce(krb5_context context, krb5_auth_context auth_context,
-		const krb5_data *inbuf, krb5_int32 *nonce)
+		const krb5_data *inbuf, krb5_ui_4 *nonce)
 {
     krb5_error_code 	  retval;
     krb5_ap_rep 	* reply;

Modified: branches/mskrb-integ/src/lib/krb5/krb/walk_rtree.c
===================================================================
--- branches/mskrb-integ/src/lib/krb5/krb/walk_rtree.c	2008-12-24 18:48:00 UTC (rev 21589)
+++ branches/mskrb-integ/src/lib/krb5/krb/walk_rtree.c	2008-12-25 22:43:41 UTC (rev 21590)
@@ -248,7 +248,7 @@
 	}
     }		/* end of if use hierarchical method */
 
-    if (!(rettree = (krb5_principal *)calloc(links+2,
+    if (!(rettree = (krb5_principal *)calloc((size_t)links+2,
 					     sizeof(krb5_principal)))) {
 	return ENOMEM;
     }




More information about the cvs-krb5 mailing list