mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Fix signed/unsigned comparison warnings and mismatched format char warning.
git-svn-id: https://svn.eduke32.com/eduke32@3786 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a082ec76dd
commit
e8ff49b6ef
3 changed files with 8 additions and 7 deletions
|
@ -103,7 +103,7 @@ static int32_t dedxt_handle_io(int32_t fil, int32_t j /* TODO: better name */,
|
|||
|
||||
inbuf = (ispacked && cleng < j) ? packbuf : midbuf;
|
||||
|
||||
if (texcache.memcache.ptr && texcache.memcache.size >= texcache.filepos + cleng)
|
||||
if (texcache.memcache.ptr && texcache.memcache.size >= (bsize_t)texcache.filepos + cleng)
|
||||
{
|
||||
if (ispacked && cleng < j)
|
||||
{
|
||||
|
|
|
@ -4506,7 +4506,7 @@ static void parascan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat, i
|
|||
|
||||
// WGR2 SVN: select new episode after playing wgmicky1 with Polymer
|
||||
// (maybe switched to classic earlier).
|
||||
// --> rendmode==0, glgetrendermode() == REND_POLYMER, we end up with globalpicnum==266,
|
||||
// --> rendmode==0, glrendermode == REND_POLYMER, we end up with globalpicnum==266,
|
||||
// picsiz...==9 and dapskybits==3
|
||||
// FIXME ?
|
||||
if (k < 0)
|
||||
|
|
|
@ -188,7 +188,8 @@ void texcache_syncmemcache(void)
|
|||
{
|
||||
size_t len;
|
||||
|
||||
if (!texcache.memcache.ptr || texcache.filehandle == -1 || Bfilelength(texcache.filehandle) <= texcache.memcache.size)
|
||||
if (!texcache.memcache.ptr || texcache.filehandle == -1 ||
|
||||
(bsize_t)Bfilelength(texcache.filehandle) <= texcache.memcache.size)
|
||||
return;
|
||||
|
||||
len = Bfilelength(texcache.filehandle);
|
||||
|
@ -378,7 +379,7 @@ int32_t texcache_readdata(void *dest, int32_t len)
|
|||
|
||||
texcache.filepos += len;
|
||||
|
||||
if (texcache.memcache.ptr && texcache.memcache.size >= ocachepos+len)
|
||||
if (texcache.memcache.ptr && texcache.memcache.size >= (bsize_t)ocachepos+len)
|
||||
{
|
||||
// initprintf("using memcache!\n");
|
||||
Bmemcpy(dest, texcache.memcache.ptr+ocachepos, len);
|
||||
|
@ -744,13 +745,13 @@ void texcache_setupmemcache(void)
|
|||
|
||||
if (!texcache.memcache.ptr)
|
||||
{
|
||||
initprintf("Failed allocating %d bytes for memcache, disabling memcache.\n", texcache.memcache.size);
|
||||
initprintf("Failed allocating %d bytes for memcache, disabling memcache.\n", (int)texcache.memcache.size);
|
||||
texcache_clearmemcache();
|
||||
texcache.memcache.noalloc = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Bread(texcache.filehandle, texcache.memcache.ptr, texcache.memcache.size) != texcache.memcache.size)
|
||||
if (Bread(texcache.filehandle, texcache.memcache.ptr, texcache.memcache.size) != (bssize_t)texcache.memcache.size)
|
||||
{
|
||||
initprintf("Failed reading texcache into memcache!\n");
|
||||
texcache_clearmemcache();
|
||||
|
|
Loading…
Reference in a new issue