From 42d6b7198bb14ca97b7299c8428675a426837820 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 20 Jan 2007 18:59:01 +0000 Subject: [PATCH] Add casts to pacify lint --- sys/sys/param.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index 8aeb2b3ee76e..d32c6eb6a504 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.249 2007/01/19 14:49:11 hannken Exp $ */ +/* $NetBSD: param.h,v 1.250 2007/01/20 18:59:01 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -172,19 +172,19 @@ */ #if defined(_KERNEL) || defined(__EXPOSE_STACK) #ifdef __MACHINE_STACK_GROWS_UP -#define STACK_GROW(sp, _size) (((caddr_t)(sp)) + (_size)) -#define STACK_SHRINK(sp, _size) (((caddr_t)(sp)) - (_size)) +#define STACK_GROW(sp, _size) (((char *)(void *)(sp)) + (_size)) +#define STACK_SHRINK(sp, _size) (((char *)(void *)(sp)) - (_size)) #define STACK_ALIGN(sp, bytes) \ - ((caddr_t)((((unsigned long)(sp)) + (bytes)) & ~(bytes))) -#define STACK_ALLOC(sp, _size) ((caddr_t)(sp)) -#define STACK_MAX(p, _size) (((caddr_t)(p)) + (_size)) + ((char *)((((unsigned long)(sp)) + (bytes)) & ~(bytes))) +#define STACK_ALLOC(sp, _size) ((char *)(void *)(sp)) +#define STACK_MAX(p, _size) (((char *)(void *)(p)) + (_size)) #else -#define STACK_GROW(sp, _size) (((caddr_t)(sp)) - (_size)) -#define STACK_SHRINK(sp, _size) (((caddr_t)(sp)) + (_size)) +#define STACK_GROW(sp, _size) (((char *)(void *)(sp)) - (_size)) +#define STACK_SHRINK(sp, _size) (((char *)(void *)(sp)) + (_size)) #define STACK_ALIGN(sp, bytes) \ - ((caddr_t)(((unsigned long)(sp)) & ~(bytes))) -#define STACK_ALLOC(sp, _size) (((caddr_t)(sp)) - (_size)) -#define STACK_MAX(p, _size) ((caddr_t)(p)) + ((char *)(((unsigned long)(sp)) & ~(bytes))) +#define STACK_ALLOC(sp, _size) (((char *)(void *)(sp)) - (_size)) +#define STACK_MAX(p, _size) ((char *)(void *)(p)) #endif #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */