From 2fac557f69f2d59b46efce5e1ea7b7b1c69d065b Mon Sep 17 00:00:00 2001 From: waltje Date: Wed, 7 Mar 2018 02:59:11 -0500 Subject: [PATCH] Fixed some compiler warnings. --- src/video/vid_s3.c | 6 +++--- src/video/vid_svga_render.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index 1a270fa..f759449 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -10,7 +10,7 @@ * * NOTE: ROM images need more/better organization per chipset. * - * Version: @(#)vid_s3.c 1.0.2 2018/02/22 + * Version: @(#)vid_s3.c 1.0.3 2018/03/06 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -138,8 +138,8 @@ typedef struct s3_t struct { - uint8_t subsys_cntl; - uint8_t setup_md; + uint16_t subsys_cntl; + uint16_t setup_md; uint8_t advfunc_cntl; uint16_t cur_y; uint16_t cur_x; diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index 3bf802c..ffc3f40 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -461,9 +461,10 @@ void svga_render_4bpp_lowres(svga_t *svga) for (x = 0; x <= svga->hdisp; x += 16) { uint8_t edat[4]; + uint32_t *pp = (uint32_t *)edat; uint8_t dat; - *(uint32_t *)(&edat[0]) = *(uint32_t *)(&svga->vram[svga->ma]); + *pp = *((uint32_t *)&svga->vram[svga->ma]); svga->ma += 4; svga->ma &= svga->vram_display_mask; @@ -507,9 +508,10 @@ void svga_render_4bpp_highres(svga_t *svga) for (x = 0; x <= svga->hdisp; x += 8) { uint8_t edat[4]; + uint32_t *pp = (uint32_t *)edat; uint8_t dat; - *(uint32_t *)(&edat[0]) = *(uint32_t *)(&svga->vram[svga->ma | ((svga->sc & ~svga->crtc[0x17] & 3)) * 0x8000]); + *pp = *(uint32_t *)(&svga->vram[svga->ma | ((svga->sc & ~svga->crtc[0x17] & 3)) * 0x8000]); svga->ma += 4; svga->ma &= svga->vram_display_mask;