Now that OF_read and OF_write have different signatures, we need to

cast one of them before assigning to a common function pointer.
Yes, this breaks strict type checking, but is needed to compile with
-Wcast-qual turned on.
This commit is contained in:
he 2005-06-09 12:23:23 +00:00
parent bd52bf6180
commit 3ee7e97fcc
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofdisk.c,v 1.30 2005/02/27 00:27:32 perry Exp $ */
/* $NetBSD: ofdisk.c,v 1.31 2005/06/09 12:23:23 he Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.30 2005/02/27 00:27:32 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.31 2005/06/09 12:23:23 he Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@ -282,7 +282,8 @@ ofdisk_strategy(struct buf *bp)
if (bp->b_bcount == 0)
goto done;
OF_io = bp->b_flags & B_READ ? OF_read : OF_write;
OF_io = bp->b_flags & B_READ ? OF_read :
(int(*)(int, void*, int))OF_write;
if (DISKPART(bp->b_dev) != RAW_PART) {
if (bounds_check_with_label(&of->sc_dk, bp, 0) <= 0) {