When passing &buffers to uvm_map, add a cast to (void *). Without it,

gcc3 with -O2 produces "dereferencing type-punned pointer will break
strict-aliasing rules" warning.
This commit is contained in:
uwe 2003-08-03 00:01:44 +00:00
parent f622478626
commit 85fb38b211
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sh3_machdep.c,v 1.49 2003/07/15 03:35:58 lukem Exp $ */
/* $NetBSD: sh3_machdep.c,v 1.50 2003/08/03 00:01:44 uwe Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.49 2003/07/15 03:35:58 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.50 2003/08/03 00:01:44 uwe Exp $");
#include "opt_kgdb.h"
#include "opt_memsize.h"
@ -287,7 +287,7 @@ sh_startup()
*/
size = MAXBSIZE * nbuf;
buffers = 0;
if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(size),
if (uvm_map(kernel_map, (vaddr_t *)(void *)&buffers, round_page(size),
NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
UVM_ADV_NORMAL, 0)) != 0)