fix parens around truth value warnings.

This commit is contained in:
sezero
2018-08-10 20:35:54 +03:00
parent d92d50efc8
commit f3ed63fc58
5 changed files with 38 additions and 35 deletions

View File

@@ -633,8 +633,7 @@ __tryReOpen:
** oem map board
*/
if (gc->oemInit) {
FARPROC oemInitMapBoard = NULL;
oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
FARPROC oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
if (oemInitMapBoard != NULL)
oemInitMapBoard(&gc->oemi);
else
@@ -676,8 +675,8 @@ __tryReOpen:
gc->oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp;
if (gc->oemInit) {
FARPROC oemInitVideoTiming = NULL;
if (oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4")) {
FARPROC oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4");
if (oemInitVideoTiming) {
if (oemInitVideoTiming(&gc->oemi.vid)) {
/*
** video timing is updated by oem dll
@@ -792,10 +791,12 @@ __tryReOpen:
FARPROC oemGet;
FxI32 tv_connected = 0;
FxI32 slimaster[2], slislave[2];
if (oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4"))
oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4");
if (oemInitSetVideo)
oemInitSetVideo(&gc->oemi);
if (oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12")) {
oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12");
if (oemGet) {
oemGet(FX_OEM_TVOUT, 4, &tv_connected);
/* Is tv connected to the board? */
if (tv_connected) {
@@ -1572,9 +1573,9 @@ __errSliExit:
--------------------------------------------------------*/
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
if (!_GlideRoot.environment.noSplash) {
HMODULE newSplash;
HMODULE newSplash = LoadLibrary("3dfxspl2.dll");
if (newSplash = LoadLibrary("3dfxspl2.dll")) {
if (newSplash) {
GrState glideState;
FxBool didLoad;
GrSplashProc fxSplash;
@@ -1883,9 +1884,9 @@ GR_ENTRY(grSstControl, FxBool, (GrControl_t code))
if (isValidP) sst1InitVgaPassCtrl(gc->base_ptr, passFlag);
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
{
FARPROC oemControl = NULL;
if (gc->oemInit) {
if ((oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4")))
FARPROC oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4");
if (oemControl)
oemControl(code);
}
}

View File

@@ -1422,7 +1422,8 @@ GR_ENTRY(grSstWinClose, void, (void))
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
if (gc->oemInit) {
if (oemRestoreVideo = GetProcAddress(gc->oemInit, "_fxoemRestoreVideo@0"))
oemRestoreVideo = GetProcAddress(gc->oemInit, "_fxoemRestoreVideo@0");
if (oemRestoreVideo)
oemRestoreVideo();
FreeLibrary(gc->oemInit);
}
@@ -1430,7 +1431,7 @@ GR_ENTRY(grSstWinClose, void, (void))
#endif /* !GLIDE_INIT_HAL */
/* Unmap the board */
hwcUnmapBoard(gc->bInfo);
hwcUnmapBoard(gc->bInfo);
/*--------------------------
GC Reset

View File

@@ -607,8 +607,8 @@ GR_ENTRY(grSstWinOpen, FxBool, (
oemi.subvendorID = OEMINIT_INVALID_BOARD_ID;
oemi.linearAddress = gc->base_ptr;
oemi.slaveAddress = NULL;
if (gc->oemInit = LoadLibrary("fxoem2x.dll")) {
if (oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4")) {
if ((gc->oemInit = LoadLibrary("fxoem2x.dll")) != NULL) {
if ((oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4")) != NULL) {
oemInitMapBoard(&oemi);
}
}
@@ -955,12 +955,12 @@ GR_ENTRY(grSstWinOpen, FxBool, (
grSstOrigin( GR_ORIGIN_LOWER_LEFT );
if (!_GlideRoot.environment.noSplash) {
HMODULE newSplash;
HMODULE newSplash = LoadLibrary("3dfxsplash2.dll");
if (newSplash = LoadLibrary("3dfxsplash2.dll")) {
FARPROC fxSplash;
if (newSplash) {
FARPROC fxSplash = GetProcAddress(newSplash, "_fxSplash@16");
if (fxSplash = GetProcAddress(newSplash, "_fxSplash@16")) {
if (fxSplash) {
fxSplash(hWnd, gc->state.screen_width,
gc->state.screen_height, nAuxBuffers);
_GlideRoot.environment.noSplash = 1;

View File

@@ -629,8 +629,7 @@ __tryReOpen:
** oem map board
*/
if (gc->oemInit) {
FARPROC oemInitMapBoard = NULL;
oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
FARPROC oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
if (oemInitMapBoard != NULL)
oemInitMapBoard(&gc->oemi);
else
@@ -672,8 +671,8 @@ __tryReOpen:
gc->oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp;
if (gc->oemInit) {
FARPROC oemInitVideoTiming = NULL;
if (oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4")) {
FARPROC oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4");
if (oemInitVideoTiming) {
if (oemInitVideoTiming(&gc->oemi.vid)) {
/*
** video timing is updated by oem dll
@@ -779,10 +778,12 @@ __tryReOpen:
FARPROC oemGet;
FxI32 tv_connected = 0;
FxI32 slimaster[2], slislave[2];
if (oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4"))
oemInitSetVideo = GetProcAddress(gc->oemInit, "_fxoemInitSetVideo@4");
if (oemInitSetVideo)
oemInitSetVideo(&gc->oemi);
if (oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12")) {
oemGet = GetProcAddress(gc->oemInit, "_fxoemGet@12");
if (oemGet) {
oemGet(FX_OEM_TVOUT, 4, &tv_connected);
/* Is tv connected to the board? */
if (tv_connected) {
@@ -1526,9 +1527,9 @@ __errSliExit:
#ifdef GLIDE_SPLASH
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
if (!_GlideRoot.environment.noSplash) {
HMODULE newSplash;
HMODULE newSplash = LoadLibrary("3dfxspl3.dll");
if (newSplash = LoadLibrary("3dfxspl3.dll")) {
if (newSplash) {
GrState glideState;
FxBool didLoad;
GrSplashProc fxSplash;
@@ -1828,9 +1829,9 @@ _grSstControl(GrControl_t code)
if (isValidP) sst1InitVgaPassCtrl(gc->base_ptr, passFlag);
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
{
FARPROC oemControl = NULL;
if (gc->oemInit) {
if ((oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4")))
FARPROC oemControl = GetProcAddress(gc->oemInit, "_fxoemControl@4");
if (oemControl)
oemControl(code);
}
}

View File

@@ -632,8 +632,8 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
oemi.subvendorID = OEMINIT_INVALID_BOARD_ID;
oemi.linearAddress = gc->base_ptr;
oemi.slaveAddress = NULL;
if (gc->oemInit = LoadLibrary("fxoem2x.dll")) {
if (oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4")) {
if ((gc->oemInit = LoadLibrary("fxoem2x.dll")) != NULL) {
if ((oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4")) != NULL) {
oemInitMapBoard(&oemi);
}
}