mirror of
https://github.com/X11Libre/xf86-video-xgi.git
synced 2026-03-24 01:24:35 +00:00
fix FTBS on missing return value
> ../../src/xgi_accel.c:1055:2: error: non-void function 'XGIUploadToScratch' should return a value [-Wreturn-type]
DisableDrawingFunctionDynamically(TRUE);
> ^
> ../../src/xgi_accel.c:185:4: note: expanded from macro 'DisableDrawingFunctionDynamically'
> return; \
> ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-xgi/-/merge_requests/8>
This commit is contained in:
committed by
Marge Bot
parent
f697a7e0df
commit
75ea1ea883
@@ -163,30 +163,6 @@ extern int FbDevExist;
|
||||
|
||||
#define DEBUG_ACCEL_DYNAMICALLY
|
||||
|
||||
#ifndef DEBUG_ACCEL_DYNAMICALLY
|
||||
#define DisableDrawingFunctionDynamically(bReturn) \
|
||||
{ \
|
||||
}
|
||||
#else
|
||||
#define DisableDrawingFunctionDynamically(bReturn) \
|
||||
{ \
|
||||
/* Jong - Good method for performance evaluation */ \
|
||||
/*-----------------------------------------------*/ \
|
||||
uint8_t CR37=0x00; /* Jong 09/11/2008; [7] for disable/enable NULL function dynamically */ \
|
||||
/* Jong 09/12/2008; disable NULL function of HW acceleration dynamically by CR37[7] */ \
|
||||
/* After test, this extra IO doesn't have significant loading */ \
|
||||
CR37=XGI_GetReg(pXGI->XGI_Pr->P3d4, 0x37); \
|
||||
\
|
||||
if((CR37 & 0x80) != 0) \
|
||||
{ \
|
||||
if(bReturn) \
|
||||
return(bReturn); \
|
||||
else \
|
||||
return; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||
#define BE_SWAP32(x) lswapl(x)
|
||||
#else
|
||||
@@ -1052,7 +1028,18 @@ XGIUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst)
|
||||
int src_pitch = exaGetPixmapPitch(pSrc);
|
||||
int dst_pitch, size, w, h, bytes;
|
||||
|
||||
DisableDrawingFunctionDynamically(TRUE);
|
||||
#ifdef DEBUG_ACCEL_DYNAMICALLY
|
||||
{
|
||||
/* Jong - Good method for performance evaluation */
|
||||
/*-----------------------------------------------*/ \
|
||||
uint8_t CR37=0x00; /* Jong 09/11/2008; [7] for disable/enable NULL function dynamically */
|
||||
/* Jong 09/12/2008; disable NULL function of HW acceleration dynamically by CR37[7] */
|
||||
/* After test, this extra IO doesn't have significant loading */
|
||||
CR37=XGI_GetReg(pXGI->XGI_Pr->P3d4, 0x37);
|
||||
if((CR37 & 0x80) != 0)
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
w = pSrc->drawable.width;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user