minor warning fixes.

This commit is contained in:
Ozkan Sezer
2021-02-02 11:11:10 +03:00
parent 438ac12be4
commit 43fbe0bf3c
11 changed files with 18 additions and 9 deletions

View File

@@ -120,6 +120,8 @@ ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -bt=dos -wx -zq
# newer OpenWatcom versions enable W303 by default
CFLAGS += -wcd=303
INCPATH = -I. -I../../incsrc -I../../init
INCPATH += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
INCPATH += -I$(FX_GLIDE_SW)/texus2/lib

View File

@@ -903,7 +903,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
? 1 /* 16-bit texture */
: 2); /* 8-bit texture */
if (max_s <= 0) max_s = 1;
if (max_s < 1) max_s = 1;
if (widthSel > 2) widthSel = 3;
_GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;

View File

@@ -114,6 +114,8 @@ ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -bt=dos -wx -zq
# newer OpenWatcom versions enable W303 by default
CFLAGS += -wcd=303
INCPATH = -I. -I../../incsrc -I../../minihwc -I../../cinit
INCPATH += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
INCPATH += -I$(FX_GLIDE_SW)/texus2/lib

View File

@@ -1340,7 +1340,7 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial,
? 1 /* 16-bit texture */
: 2); /* 8-bit texture */
if (max_s <= 0) max_s = 1;
if (max_s < 1) max_s = 1;
if (widthSel > 2) widthSel = 3;
gc->stats.texBytes += max_s * (max_t - t + 1) * 4;

View File

@@ -121,6 +121,8 @@ ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -bt=dos -wx -zq
# newer OpenWatcom versions enable W303 by default
CFLAGS += -wcd=303
INCPATH = -I. -I../../incsrc -I../../minihwc -I../../cinit
INCPATH += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
INCPATH += -I$(FX_GLIDE_SW)/texus2/lib

View File

@@ -7307,6 +7307,7 @@ static void hwcCopyBuffer8888FlippedDithered(hwcBoardInfo *bInfo, FxU16 *source,
:"a"(src), "d"(dst), "D"(endline), "S"(end), "m"(w), "m"(dither_mask), "g"(val_max), "m"(aaShift), "c"(sse_mmxplus)
:"%ebx");
#elif defined(__WATCOMC__)
(void) sse_mmxplus; /* FIXME -- UNUSED */
#else
__asm
{

View File

@@ -120,6 +120,8 @@ ASFLAGS += $(CDEFS)
# compiler
CFLAGS = -bt=dos -wx -zq
# newer OpenWatcom versions enable W303 by default
CFLAGS += -wcd=303
INCPATH = -I. -I../../incsrc -I../../init -I../../init/initvg -I../../init/init96
INCPATH += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
INCPATH += -I$(FX_GLIDE_SW)/texus2/lib

View File

@@ -297,12 +297,12 @@ GR_ENTRY(grTexDownloadMipMapLevelPartial, FxBool, ( GrChipID_t tmu, FxU32 startA
if ( format < GR_TEXFMT_16BIT ) { /* 8-bit texture */
bytesPerTexel = 1;
max_s = width >> 2;
if ( max_s <= 0 )
if (max_s < 1)
max_s = 1;
} else { /* 16-bit texture */
bytesPerTexel = 2;
max_s = width >> 1;
if ( max_s <= 0 )
if (max_s < 1)
max_s = 1;
}
/* assume max_s is a power of two */