From 9e27b29fba08158ea646560dc2c0f671e17923cf Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 16 Aug 1998 01:21:52 +0000 Subject: Use [u]intptr_t instead of [u_]long for casts between pointers and integers. Don't forget to cast to (void *) as well. --- sys/pci/brooktree848.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index 051cc6f..780e60d 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -3056,7 +3056,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , /* must be Blue. */ start_skip = 0; if (( pf->type == METEOR_PIXTYPE_RGB ) && ( pf->Bpp == 3 )) - switch ( ((u_long) *target_buffer) % 4 ) { + switch ( ((uintptr_t) (void *) *target_buffer) % 4 ) { case 2 : start_skip = 4 ; break; case 1 : start_skip = 8 ; break; } @@ -3079,7 +3079,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , *(*dma_prog)++ = operation | flag | (width * pixel_width - skip); if (operation != OP_SKIP ) - *(*dma_prog)++ = (u_long) *target_buffer; + *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer; *target_buffer += width * pixel_width; bktr->current_col += width; @@ -3110,7 +3110,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width , *(*dma_prog)++ = operation | flag | (width * pixel_width / 2 - skip); if (operation != OP_SKIP ) - *(*dma_prog)++ = (u_long ) *target_buffer ; + *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer ; *target_buffer += (width * pixel_width / 2) ; if ( operation == OP_WRITE ) -- cgit v1.1