vax-specific lint fixes.

This commit is contained in:
christos 2012-03-22 17:32:21 +00:00
parent 92a9368199
commit 1bb11e66cb
3 changed files with 29 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: _lwp.c,v 1.2 2012/01/07 16:47:42 chs Exp $ */
/* $NetBSD: _lwp.c,v 1.3 2012/03/22 17:32:22 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: _lwp.c,v 1.2 2012/01/07 16:47:42 chs Exp $");
__RCSID("$NetBSD: _lwp.c,v 1.3 2012/03/22 17:32:22 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@ -68,20 +68,20 @@ _lwp_makecontext(ucontext_t *u, void (*start)(void *),
sp[1] = 0x20000000; /* make this a CALLS frame */
sp[2] = 0; /* saved argument pointer */
sp[3] = 0; /* saved frame pointer */
sp[4] = (intptr_t)_lwp_exit + 2;/* return via _lwp_exit */
sp[4] = (int)(uintptr_t)_lwp_exit + 2;/* return via _lwp_exit */
sp[5] = 1; /* argc */
sp[6] = (intptr_t)arg; /* argv */
sp[6] = (int)(uintptr_t)arg; /* argv */
gr[_REG_AP] = (__greg_t)(sp + 5);
gr[_REG_SP] = (__greg_t)sp;
gr[_REG_FP] = (__greg_t)sp;
gr[_REG_PC] = (__greg_t)start + 2;
gr[_REG_AP] = (__greg_t)(uintptr_t)(sp + 5);
gr[_REG_SP] = (__greg_t)(uintptr_t)sp;
gr[_REG_FP] = (__greg_t)(uintptr_t)sp;
gr[_REG_PC] = (__greg_t)(uintptr_t)start + 2;
/*
* Push the TLS pointer onto the new stack also.
* The _UC_TLSBASE flag tells the kernel to pop it and use it.
*/
*--sp = (intptr_t)private;
gr[_REG_SP] = (__greg_t)sp;
*--sp = (int)(intptr_t)private;
gr[_REG_SP] = (__greg_t)(uintptr_t)sp;
u->uc_flags |= _UC_TLSBASE;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:57 martin Exp $ */
/* $NetBSD: makecontext.c,v 1.4 2012/03/22 17:32:22 christos Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:57 martin Exp $");
__RCSID("$NetBSD: makecontext.c,v 1.4 2012/03/22 17:32:22 christos Exp $");
#endif
#include <stddef.h>
@ -69,11 +69,11 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
sp[1] = 0x20000000; /* make this a CALLS frame */
sp[2] = 0; /* saved argument pointer */
sp[3] = 0; /* saved frame pointer */
sp[4] = (int)_resumecontext+2; /* return via trampoline code */
sp[4] = (int)(uintptr_t)_resumecontext+2;/* return via trampoline code */
gr[_REG_AP] = (__greg_t)(sp + 5);
gr[_REG_SP] = (__greg_t)sp;
gr[_REG_FP] = (__greg_t)sp;
gr[_REG_PC] = (__greg_t)func+2;
gr[_REG_AP] = (__greg_t)(uintptr_t)(sp + 5);
gr[_REG_SP] = (__greg_t)(uintptr_t)sp;
gr[_REG_FP] = (__greg_t)(uintptr_t)sp;
gr[_REG_PC] = (__greg_t)(uintptr_t)func+2;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: xdr_float.c,v 1.35 2009/02/14 06:26:42 lukem Exp $ */
/* $NetBSD: xdr_float.c,v 1.36 2012/03/22 17:32:21 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -35,7 +35,7 @@
static char *sccsid = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC";
#else
__RCSID("$NetBSD: xdr_float.c,v 1.35 2009/02/14 06:26:42 lukem Exp $");
__RCSID("$NetBSD: xdr_float.c,v 1.36 2012/03/22 17:32:21 christos Exp $");
#endif
#endif
@ -125,7 +125,7 @@ xdr_float(xdrs, fp)
#ifdef IEEEFP
return (XDR_PUTINT32(xdrs, (int32_t *)(void *)fp));
#else
vs = *((struct vax_single *)fp);
vs = *((struct vax_single *)(void *)fp);
for (i = 0, lim = sgl_limits;
i < sizeof(sgl_limits)/sizeof(struct sgl_limits);
i++, lim++) {
@ -147,7 +147,7 @@ xdr_float(xdrs, fp)
#ifdef IEEEFP
return (XDR_GETINT32(xdrs, (int32_t *)(void *)fp));
#else
vsp = (struct vax_single *)fp;
vsp = (struct vax_single *)(void *)fp;
if (!XDR_GETINT32(xdrs, (int32_t *)(void *)&is))
return (FALSE);
for (i = 0, lim = sgl_limits;
@ -161,7 +161,7 @@ xdr_float(xdrs, fp)
}
vsp->exp = is.exp - IEEE_SNG_BIAS + VAX_SNG_BIAS;
vsp->mantissa2 = is.mantissa;
vsp->mantissa1 = (is.mantissa >> 16);
vsp->mantissa1 = ((unsigned int)is.mantissa >> 16);
doneit:
vsp->sign = is.sign;
return (TRUE);
@ -245,7 +245,7 @@ xdr_double(xdrs, dp)
#endif
return (rv);
#else
vd = *((struct vax_double *)dp);
vd = *((struct vax_double *)(void *)dp);
for (i = 0, lim = dbl_limits;
i < sizeof(dbl_limits)/sizeof(struct dbl_limits);
i++, lim++) {
@ -259,10 +259,11 @@ xdr_double(xdrs, dp)
}
}
id.exp = vd.exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;
id.mantissa1 = (vd.mantissa1 << 13) | (vd.mantissa2 >> 3);
id.mantissa1 = (vd.mantissa1 << 13) |
((unsigned int)vd.mantissa2 >> 3);
id.mantissa2 = ((vd.mantissa2 & MASK(3)) << 29) |
(vd.mantissa3 << 13) |
((vd.mantissa4 >> 3) & MASK(13));
(((unsigned int)vd.mantissa4 >> 3) & MASK(13));
shipit:
id.sign = vd.sign;
lp = (int32_t *)(void *)&id;
@ -300,10 +301,10 @@ xdr_double(xdrs, dp)
}
}
vd.exp = id.exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;
vd.mantissa1 = (id.mantissa1 >> 13);
vd.mantissa1 = ((unsigned int)id.mantissa1 >> 13);
vd.mantissa2 = ((id.mantissa1 & MASK(13)) << 3) |
(id.mantissa2 >> 29);
vd.mantissa3 = (id.mantissa2 >> 13);
((unsigned int)id.mantissa2 >> 29);
vd.mantissa3 = ((unsigned int)id.mantissa2 >> 13);
vd.mantissa4 = (id.mantissa2 << 3);
doneit:
vd.sign = id.sign;