From a5ce52dc78456e8feaa5e18c5d3a2e1a51de0569 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 28 Nov 2015 09:06:22 +0000 Subject: [PATCH] Fix compiler warnings when building for 32-bit. git-svn-id: https://svn.eduke32.com/eduke32@5456 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 2 +- polymer/eduke32/source/common.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 7e65f59cd..76fe70951 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -2152,7 +2152,7 @@ static void polymer_emptybuckets(void) } // ensure space in index ring, wrap otherwise - if (indexcount + prindexringoffset >= prindexringsize) + if (indexcount + prindexringoffset >= (unsigned)prindexringsize) { bglUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER); prindexring = (GLuint *)bglMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, prindexringsize * sizeof(GLuint), GL_MAP_INVALIDATE_BUFFER_BIT | prindexringmapflags); diff --git a/polymer/eduke32/source/common.c b/polymer/eduke32/source/common.c index bee6c1bfb..46859b3ef 100644 --- a/polymer/eduke32/source/common.c +++ b/polymer/eduke32/source/common.c @@ -511,7 +511,7 @@ static int G_ReadRegistryValue(char const * const SubKey, char const * const Val if (keygood != ERROR_SUCCESS) return 0; - LSTATUS retval = SHGetValueA(hkey, SubKey, Value, NULL, Output, OutputSize); + LONG retval = SHGetValueA(hkey, SubKey, Value, NULL, Output, OutputSize); RegCloseKey(hkey); @@ -1109,7 +1109,7 @@ int32_t S_OpenAudio(const char *fn, char searchfirst, uint8_t const ismusic) if (origparent != NULL) { char const * const origparentextension = Bstrrchr(origparent, '.'); - uint32_t namelength = origparentextension != NULL ? origparentextension - origparent : origparentlength; + uint32_t namelength = origparentextension != NULL ? (unsigned)(origparentextension - origparent) : origparentlength; Bsprintf(testfn, "music/%.*s/%s", namelength, origparent, fn); int32_t const fp = S_TryExtensionReplacements(testfn, searchfirst, ismusic);