From: Ken Raeburn Date: Mon, 2 Jun 2008 23:04:09 +0000 (+0000) Subject: Fix a few incompatible-pointer warnings that aren't just about signedness X-Git-Tag: krb5-1.7-alpha1~670 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10983562979887f84bb5148ebe08a6b284d79451;p=krb5.git Fix a few incompatible-pointer warnings that aren't just about signedness git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20351 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index 8de199885..f9647eae2 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001, 2002, 2004, 2007 by the Massachusetts Institute of Technology. + * Copyright (C) 2001, 2002, 2004, 2007, 2008 by the Massachusetts Institute of Technology. * All rights reserved. * * @@ -172,7 +172,7 @@ read_entropy_from_device (krb5_context context, const char *device) return 0; } - for (bp = &buf, left = sizeof (buf); left > 0;) { + for (bp = buf, left = sizeof (buf); left > 0;) { ssize_t count; count = read (fd, bp, (unsigned) left); if (count <= 0) { diff --git a/src/lib/gssapi/generic/util_errmap.c b/src/lib/gssapi/generic/util_errmap.c index 5cd554cde..4142c3c06 100644 --- a/src/lib/gssapi/generic/util_errmap.c +++ b/src/lib/gssapi/generic/util_errmap.c @@ -1,5 +1,5 @@ /* - * Copyright 2007 by the Massachusetts Institute of Technology. + * Copyright 2007, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -152,7 +152,7 @@ int gssint_mecherrmap_init(void) /* Currently the enumeration template doesn't handle freeing element storage when destroying the collection. */ -static int free_one(size_t i, struct mecherror value, void *p) +static int free_one(OM_uint32 i, struct mecherror value, void *p) { if (value.mech.length && value.mech.elements) free(value.mech.elements); diff --git a/src/lib/gssapi/krb5/ser_sctx.c b/src/lib/gssapi/krb5/ser_sctx.c index 00ea78254..92bb302f0 100644 --- a/src/lib/gssapi/krb5/ser_sctx.c +++ b/src/lib/gssapi/krb5/ser_sctx.c @@ -1,7 +1,7 @@ /* * lib/gssapi/krb5/ser_sctx.c * - * Copyright 1995, 2004 by the Massachusetts Institute of Technology. + * Copyright 1995, 2004, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -561,10 +561,14 @@ kg_ctx_internalize(kcontext, argp, buffer, lenremain) return kret; } - if ((kret = kg_oid_internalize(kcontext, &ctx->mech_used, &bp, - &remain))) { - if (kret == EINVAL) - kret = 0; + { + krb5_pointer tmp; + kret = kg_oid_internalize(kcontext, &tmp, &bp, + &remain); + if (kret == 0) + ctx->mech_used = tmp; + else if (kret == EINVAL) + kret = 0; } /* Now get substructure data */ if ((kret = krb5_internalize_opaque(kcontext, diff --git a/src/lib/krb4/g_tkt_svc.c b/src/lib/krb4/g_tkt_svc.c index a16451776..d9a2d9f62 100644 --- a/src/lib/krb4/g_tkt_svc.c +++ b/src/lib/krb4/g_tkt_svc.c @@ -40,12 +40,12 @@ static void CopyTicket(dest, src, numBytes, version, includeVersion) char *dest; KTEXT src; - unsigned long *numBytes; + unsigned KRB4_32 *numBytes; char *version; int includeVersion; { - unsigned long tkt_len; - unsigned long nbytes = 0; + unsigned KRB4_32 tkt_len; + unsigned KRB4_32 nbytes = 0; /* first put version info into the buffer */ if (includeVersion) { diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c index a81221f34..8220ea2ab 100644 --- a/src/lib/rpc/svc_tcp.c +++ b/src/lib/rpc/svc_tcp.c @@ -285,7 +285,7 @@ rendezvous_request( return (FALSE); } set_cloexec_fd(sock); - if (getsockname(sock, &laddr, &llen) < 0) + if (getsockname(sock, (struct sockaddr *) &laddr, &llen) < 0) return (FALSE); /*