Compile fixes for gcc -Wall

This commit is contained in:
baldurk 2015-08-05 20:54:58 +02:00
parent 0718e45c24
commit d7c5ead6a1
12 changed files with 27 additions and 24 deletions

View file

@ -183,7 +183,7 @@ void TPpContext::InitAtomTable()
}
// Add multiple character scanner tokens :
for (int ii = 0; ii < sizeof(tokens)/sizeof(tokens[0]); ii++)
for (size_t ii = 0; ii < sizeof(tokens)/sizeof(tokens[0]); ii++)
AddAtomFixed(tokens[ii].str, tokens[ii].val);
nextAtom = PpAtomLast;

View file

@ -82,7 +82,10 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../ParseHelper.h"
#pragma warning(disable : 4127)
/* windows only pragma */
#ifdef _MSC_VER
#pragma warning(disable : 4127)
#endif
namespace glslang {

View file

@ -440,7 +440,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
const unsigned remainderMaxInt = 0xFFFFFFFFu - 10 * oneTenthMaxInt;
for (int i = 0; i < numericLen; i++) {
ch = ppToken->name[i] - '0';
if ((ival > oneTenthMaxInt) || (ival == oneTenthMaxInt && ch > remainderMaxInt)) {
if ((ival > oneTenthMaxInt) || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt)) {
pp->parseContext.ppError(ppToken->loc, "numeric literal too big", "", "");
ival = 0xFFFFFFFFu;
break;

View file

@ -100,7 +100,7 @@ TPpContext::Symbol* TPpContext::NewSymbol(int atom)
{
Symbol* lSymb;
char* pch;
int ii;
size_t ii;
lSymb = (Symbol *) mem_Alloc(pool, sizeof(Symbol));
lSymb->atom = atom;