From 9935e14f9ba4377402020158c550cadbef430272 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 27 May 2016 14:02:59 -0400 Subject: [PATCH] A few more Visual Studio warning fixes. --- mojoshader.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index a9438feb..a97bd34b 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -12050,7 +12050,7 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf, void *d) { // !!! FIXME: This is copypasta ripped from parse_preshader -flibit - int i; + unsigned int i; // All sections of a preshader are packed into separate comment tokens, // inside the containing comment token block. Find them all before @@ -12060,6 +12060,8 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf, PreshaderBlockInfo fxlc = { 0, 0, 0 }; PreshaderBlockInfo clit = { 0, 0, 0 }; + CtabData ctabdata = { 0, 0, 0 }; + const uint32 *tokens = (const uint32 *) buf; uint32 tokcount = _len / 4; @@ -12190,7 +12192,6 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf, } // Now we'll figure out the CTAB... - CtabData ctabdata = { 0, 0, 0 }; parse_constant_table(&fillerContext, ctab.tokens - 1, ctab.tokcount * 4, version, 0, &ctabdata); @@ -12297,7 +12298,7 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf, case 2: // item from ctabdata. { MOJOSHADER_symbol *sym = ctabdata.symbols; - for (i = 0; i < ctabdata.symbol_count; i++, sym++) + for (i = 0; i < (unsigned int) ctabdata.symbol_count; i++, sym++) { const uint32 base = sym->register_index * 4; const uint32 count = sym->register_count * 4;