Adapt to compiling with -Wcast-qual by adding a const and a couple

of __volatile__ uses.
This commit is contained in:
he 2005-06-26 19:57:30 +00:00
parent a05900d94d
commit 5b718ea54c
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.9 2003/10/08 04:25:45 lukem Exp $ */
/* $NetBSD: disksubr.c,v 1.10 2005/06/26 19:57:30 he Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.9 2003/10/08 04:25:45 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.10 2005/06/26 19:57:30 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -100,7 +100,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
struct dkbad *bdp;
struct buf *bp;
struct disklabel *dlp;
char *msg = NULL;
const char *msg = NULL;
int dospartoff, cyl, i;
/* minimal requirements for archtypal disk label */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sifbios.c,v 1.4 2003/10/22 20:15:20 he Exp $ */
/* $NetBSD: sifbios.c,v 1.5 2005/06/26 19:57:30 he Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sifbios.c,v 1.4 2003/10/22 20:15:20 he Exp $");
__KERNEL_RCSID(0, "$NetBSD: sifbios.c,v 1.5 2005/06/26 19:57:30 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -84,11 +84,11 @@ sifbios_rpc_call(int callno, void *arg, int *result)
int result;
void *arg;
void (*callback)(void *, int);
void *callback_arg;
__volatile__ void *callback_arg;
} __attribute__((__packed__, __aligned__(4))) sifbios_arg = {
arg: arg,
callback: sifbios_rpc_callback,
callback_arg: (void *)&done,
callback_arg: (__volatile__ void *)&done,
};
/* call SIF BIOS */