Fixed some compiler warnings.

This commit is contained in:
waltje
2018-03-07 02:59:11 -05:00
parent 17a879f932
commit 2fac557f69
2 changed files with 7 additions and 5 deletions

View File

@@ -10,7 +10,7 @@
* *
* NOTE: ROM images need more/better organization per chipset. * 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, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -138,8 +138,8 @@ typedef struct s3_t
struct struct
{ {
uint8_t subsys_cntl; uint16_t subsys_cntl;
uint8_t setup_md; uint16_t setup_md;
uint8_t advfunc_cntl; uint8_t advfunc_cntl;
uint16_t cur_y; uint16_t cur_y;
uint16_t cur_x; uint16_t cur_x;

View File

@@ -461,9 +461,10 @@ void svga_render_4bpp_lowres(svga_t *svga)
for (x = 0; x <= svga->hdisp; x += 16) for (x = 0; x <= svga->hdisp; x += 16)
{ {
uint8_t edat[4]; uint8_t edat[4];
uint32_t *pp = (uint32_t *)edat;
uint8_t dat; 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 += 4;
svga->ma &= svga->vram_display_mask; 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) for (x = 0; x <= svga->hdisp; x += 8)
{ {
uint8_t edat[4]; uint8_t edat[4];
uint32_t *pp = (uint32_t *)edat;
uint8_t dat; 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 += 4;
svga->ma &= svga->vram_display_mask; svga->ma &= svga->vram_display_mask;