From 9d1da548aa7f76f194bd89ce15ab6c099fbe3878 Mon Sep 17 00:00:00 2001 From: JTE Date: Sun, 2 Nov 2014 04:15:05 +0000 Subject: [PATCH] Fix hardware / r_opengl warnings. --- src/hardware/hw_cache.c | 3 +-- src/hardware/hw_main.c | 2 +- src/hardware/r_opengl/r_opengl.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 4b2ff9f2..78fc31af 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -1045,7 +1045,6 @@ static void HWR_CacheFadeMask(GLMipmap_t *grMipmap, lumpnum_t fademasklumpnum) { size_t size; UINT16 fmheight = 0, fmwidth = 0; - UINT8 *block; // The fade mask's pixels // setup the texture info grMipmap->grInfo.format = GR_TEXFMT_ALPHA_8; // put the correct alpha levels straight in so I don't need to convert it later @@ -1083,7 +1082,7 @@ static void HWR_CacheFadeMask(GLMipmap_t *grMipmap, lumpnum_t fademasklumpnum) grMipmap->width = blockwidth; grMipmap->height = blockheight; - block = MakeBlock(grMipmap); + MakeBlock(grMipmap); HWR_DrawFadeMaskInCache(grMipmap, blockwidth, blockheight, fademasklumpnum, fmwidth, fmheight); diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 43be6ed0..3e5ee377 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2751,7 +2751,7 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, fixed_t fixedheight flatyref = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINESINE(angle)) + FixedMul(tempytow, FINECOSINE(angle)))); } - for (i = 0; i < nrPlaneVerts; i++,v3d++) + for (i = 0; i < (INT32)nrPlaneVerts; i++,v3d++) { // Hurdler: add scrolling texture on floor/ceiling v3d->sow = (float)((FIXED_TO_FLOAT(polysector->origVerts[i].x) / fflatsize) - flatxref + scrollx); // Go from the polysector's original vertex locations diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 7590f49f..c136d063 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -532,7 +532,7 @@ boolean SetupGLFunc13(void) const char *glversion = (const char *)pglGetString(GL_VERSION); UINT32 majorversion = 0, minorversion = 0; - if (glversion != NULL && sscanf((char *)glversion, "%u.%u", &majorversion, &minorversion) == 2) // There is a version number I can identify + if (glversion != NULL && sscanf(glversion, "%u.%u", &majorversion, &minorversion) == 2) // There is a version number I can identify { if (majorversion > 1 || (majorversion == 1 && minorversion >= 3)) // Version of OpenGL is equal to or greater than 1.3 {