From 470a68cfd4963cc804e070dce43f07169601e961 Mon Sep 17 00:00:00 2001 From: LoopDawg Date: Fri, 1 Jun 2018 20:23:34 -0600 Subject: [PATCH] Fix several signed/unsigned comparison compile warnings. --- glslang/MachineIndependent/intermOut.cpp | 2 +- glslang/MachineIndependent/preprocessor/PpTokens.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index 17c5b42..fc75964 100755 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -1131,7 +1131,7 @@ static void OutputDouble(TInfoSink& out, double value, TOutputTraverser::EExtraO { out.debug << " : "; long long b = *reinterpret_cast(&value); - for (int i = 0; i < 8 * sizeof(value); ++i, ++b) { + for (size_t i = 0; i < 8 * sizeof(value); ++i, ++b) { out.debug << ((b & 0x8000000000000000) != 0 ? "1" : "0"); b <<= 1; } diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index d8088e7..7dc2722 100755 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -188,7 +188,7 @@ void TPpContext::TokenStream::putToken(int atom, TPpToken* ppToken) // save the numeric value if (SaveValue(atom)) { const char* n = reinterpret_cast(&ppToken->i64val); - for (int i = 0; i < sizeof(ppToken->i64val); ++i) + for (size_t i = 0; i < sizeof(ppToken->i64val); ++i) putSubtoken(*n++); } } @@ -238,7 +238,7 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken // get the numeric value if (SaveValue(atom)) { char* n = reinterpret_cast(&ppToken->i64val); - for (int i = 0; i < sizeof(ppToken->i64val); ++i) + for (size_t i = 0; i < sizeof(ppToken->i64val); ++i) *n++ = getSubtoken(); } -- 2.7.4