fix pointer mismatch issues

FreeBSD compiler hates pointer arithmetics on void* pointers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-01-22 10:03:37 +01:00
committed by Enrico Weigelt
parent 74f27fa31c
commit 9bd48ad4cb
2 changed files with 9 additions and 8 deletions

View File

@@ -34,6 +34,7 @@
#define _SIS_H_ #define _SIS_H_
#include <stdio.h> #include <stdio.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include <setjmp.h> #include <setjmp.h>
@@ -734,7 +735,7 @@ typedef struct {
ULong masterFbSize; ULong masterFbSize;
ULong slaveFbAddress; ULong slaveFbAddress;
ULong slaveFbSize; ULong slaveFbSize;
void *FbBase; /* VRAM linear address */ uint8_t *FbBase; /* VRAM linear address */
UChar *RealFbBase; /* Real VRAM linear address (for DHM, SiS76x UMA skipping) */ UChar *RealFbBase; /* Real VRAM linear address (for DHM, SiS76x UMA skipping) */
void *IOBase; /* MMIO linear address */ void *IOBase; /* MMIO linear address */
UShort MapCountIOBase; /* map/unmap queue counter */ UShort MapCountIOBase; /* map/unmap queue counter */
@@ -834,12 +835,12 @@ typedef struct {
int hasTwoOverlays; /* Chipset supports two video overlays? */ int hasTwoOverlays; /* Chipset supports two video overlays? */
struct SiS_Private *SiS_Pr; /* For mode switching code */ struct SiS_Private *SiS_Pr; /* For mode switching code */
int DSTN; /* For 550 FSTN/DSTN; set by option, no detection */ int DSTN; /* For 550 FSTN/DSTN; set by option, no detection */
ULong FbAddress; /* VRAM physical address (in DHM: for each Fb!) */ pciaddr_t FbAddress; /* VRAM physical address (in DHM: for each Fb!) */
ULong realFbAddress; /* For DHM/PCI mem mapping: store global FBAddress */ pciaddr_t realFbAddress; /* For DHM/PCI mem mapping: store global FBAddress */
void *FbBase; /* VRAM virtual linear address */ uint8_t *FbBase; /* VRAM virtual linear address */
void *RealFbBase; /* Real VRAM virtual linear address (for DHM and SiS76x UMA skipping) */ void *RealFbBase; /* Real VRAM virtual linear address (for DHM and SiS76x UMA skipping) */
CARD32 IOAddress; /* MMIO physical address */ CARD32 IOAddress; /* MMIO physical address */
void *IOBase; /* MMIO linear address */ uint8_t *IOBase; /* MMIO linear address */
#ifdef __alpha__ #ifdef __alpha__
void *IOBaseDense; /* MMIO for Alpha platform */ void *IOBaseDense; /* MMIO for Alpha platform */
#endif #endif
@@ -1031,7 +1032,7 @@ typedef struct {
int mapPhys, mapOff, mapSize; int mapPhys, mapOff, mapSize;
int statePage, stateSize, stateMode; int statePage, stateSize, stateMode;
CARD8 *fonts; CARD8 *fonts;
CARD8 *state, *pstate; void *state, *pstate;
void *base, *VGAbase; void *base, *VGAbase;
#ifdef SISDUALHEAD #ifdef SISDUALHEAD
Bool DualHeadMode; /* TRUE if we use dual head mode */ Bool DualHeadMode; /* TRUE if we use dual head mode */

View File

@@ -175,9 +175,9 @@ SISDRIScreenInit(ScreenPtr pScreen)
* at the offset sarea->cmdQueueOffset * at the offset sarea->cmdQueueOffset
*/ */
#if DRIINFO_MAJOR_VERSION <= 4 #if DRIINFO_MAJOR_VERSION <= 4
pDRIInfo->frameBufferPhysicalAddress = pSIS->realFbAddress; pDRIInfo->frameBufferPhysicalAddress = (void*)pSIS->realFbAddress;
#else #else
pDRIInfo->frameBufferPhysicalAddress = pSIS->realFbAddress; pDRIInfo->frameBufferPhysicalAddress = (void*)pSIS->realFbAddress;
#endif #endif
pDRIInfo->frameBufferSize = pSIS->FbMapSize; pDRIInfo->frameBufferSize = pSIS->FbMapSize;