DECONST->UNCONST

This commit is contained in:
christos 2004-07-01 19:04:58 +00:00
parent af06392139
commit 95bd3d33bf
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: infutil.c,v 1.7 2004/06/30 15:44:55 christos Exp $ */
/* $NetBSD: infutil.c,v 1.8 2004/07/01 19:04:58 christos Exp $ */
/* inflate_util.c -- data and routines common to blocks and codes
* Copyright (C) 1995-2002 Mark Adler
@ -41,7 +41,7 @@ static const char *const zerrlist[] = {
char *zerror(e)
int e;
{
return __DECONST(zerrlist[e]);
return __UNCONST(zerrlist[e]);
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: cdefs.h,v 1.54 2004/06/30 13:57:32 christos Exp $ */
/* $NetBSD: cdefs.h,v 1.55 2004/07/01 19:05:12 christos Exp $ */
/*
* Copyright (c) 1991, 1993
@ -140,11 +140,11 @@
* from gcc -Wcast-qual; it should be used with caution because it
* can hide valid errors; in particular most valid uses are in
* situations where the API requires it, not to cast away string
* constants. We don't use intptr_t on purpose here and we are
* constants. We don't use *intptr_t on purpose here and we are
* explicit about unsigned long so that we don't have additional
* dependencies.
*/
#define __DECONST(a) ((void *)(unsigned long)(const void *)(a))
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
/*
* GCC2 provides __extension__ to suppress warnings for various GNU C