diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 42a3b820d6f6b81c34d7137e9e653ace1965b001..fcdab39c561e3f245e56ab98ad049393612101ba 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1371,7 +1371,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
 
                     // built-in variable decorations
                     int builtIn = TranslateBuiltInDecoration(glslangType.getQualifier().builtIn);
-                    if (builtIn != spv::BadValue)
+                    if ((unsigned int)builtIn != spv::BadValue)
                         builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, builtIn);
                 }
             }
@@ -2519,7 +2519,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
 
     // built-in variable decorations
     int builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn);
-    if (builtIn != spv::BadValue)
+    if ((unsigned int)builtIn != spv::BadValue)
         builder.addDecoration(id, spv::DecorationBuiltIn, builtIn);
 
     if (linkageOnly)
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
index d62d2bcff444d487285087844b4a0574f8b4c926..474e78d737b16b92abd518e51e906a8147a5ca8b 100644
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -1032,7 +1032,7 @@ Id Builder::createRvalueSwizzle(Id typeId, Id source, std::vector<unsigned>& cha
 // Comments in header
 Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, std::vector<unsigned>& channels)
 {
-    assert(getNumComponents(source) == channels.size());
+    assert((size_t)getNumComponents(source) == channels.size());
     if (channels.size() == 1 && getNumComponents(source) == 1)
         return createCompositeInsert(source, target, typeId, channels.front());
 
@@ -1471,7 +1471,7 @@ Id Builder::createCompare(Decoration precision, Id value1, Id value2, bool equal
 // OpCompositeConstruct
 Id Builder::createCompositeConstruct(Id typeId, std::vector<Id>& constituents)
 {
-    assert(isAggregateType(typeId) || getNumTypeComponents(typeId) > 1 && getNumTypeComponents(typeId) == constituents.size());
+    assert((isAggregateType(typeId) || getNumTypeComponents(typeId) > 1) && (size_t)getNumTypeComponents(typeId) == constituents.size());
 
     Instruction* op = new Instruction(getUniqueId(), typeId, OpCompositeConstruct);
     for (int c = 0; c < (int)constituents.size(); ++c)
diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp
index e64ee3dfe0468cfc5969bd8da74595df7c1505bc..b5982fa1f407efab94e3869d0a9bafdd751f9674 100644
--- a/glslang/MachineIndependent/Constant.cpp
+++ b/glslang/MachineIndependent/Constant.cpp
@@ -172,7 +172,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* const
             case EbtInt:
                 if (rightUnionArray[i] == 0)
                     newConstArray[i].setIConst(0x7FFFFFFF);
-                else if (rightUnionArray[i].getIConst() == -1 && unionArray[i].getIConst() == 0x80000000)
+                else if (rightUnionArray[i].getIConst() == -1 && (unsigned int)unionArray[i].getIConst() == 0x80000000)
                     newConstArray[i].setIConst(0x80000000);
                 else
                     newConstArray[i].setIConst(unionArray[i].getIConst() / rightUnionArray[i].getIConst());
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp
index f9fad8b51261fa66aefec32be6d316e9f368954c..66eff0cce1d43a97c7b17cd7a15d01f894128c36 100644
--- a/glslang/MachineIndependent/ParseHelper.cpp
+++ b/glslang/MachineIndependent/ParseHelper.cpp
@@ -3530,13 +3530,13 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
             // the implementation-dependent constant gl_MaxTransformFeedbackBuffers."
             if (value >= resources.maxTransformFeedbackBuffers)
                 error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", resources.maxTransformFeedbackBuffers);                
-            if (value >= TQualifier::layoutXfbBufferEnd)
+            if (value >= (int)TQualifier::layoutXfbBufferEnd)
                 error(loc, "buffer is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbBufferEnd-1);
             else
                 publicType.qualifier.layoutXfbBuffer = value;
             return;
         } else if (id == "xfb_offset") {
-            if (value >= TQualifier::layoutXfbOffsetEnd)
+            if (value >= (int)TQualifier::layoutXfbOffsetEnd)
                 error(loc, "offset is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbOffsetEnd-1);
             else
                 publicType.qualifier.layoutXfbOffset = value;
@@ -3546,9 +3546,9 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
             // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
             if (value > 4 * resources.maxTransformFeedbackInterleavedComponents)
                 error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents);
-            else if (value >= TQualifier::layoutXfbStrideEnd)
+            else if (value >= (int)TQualifier::layoutXfbStrideEnd)
                 error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd-1);
-            if (value < TQualifier::layoutXfbStrideEnd)
+            if (value < (int)TQualifier::layoutXfbStrideEnd)
                 publicType.qualifier.layoutXfbStride = value;
             return;
         }
@@ -4927,7 +4927,7 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi
                 TQualifier& memberQualifier = typeList[member].type->getQualifier();
                 const TSourceLoc& memberLoc = typeList[member].loc;
                 if (! memberQualifier.hasLocation()) {
-                    if (nextLocation >= TQualifier::layoutLocationEnd)
+                    if (nextLocation >= (int)TQualifier::layoutLocationEnd)
                         error(memberLoc, "location is too large", "location", "");
                     memberQualifier.layoutLocation = nextLocation;
                     memberQualifier.layoutComponent = 0;
diff --git a/glslang/MachineIndependent/Scan.h b/glslang/MachineIndependent/Scan.h
index eade05fd91c8fa1e439737ebb28dfe7b52f98925..245d48972633e9c1d1b9daac7e3444341f217d9c 100644
--- a/glslang/MachineIndependent/Scan.h
+++ b/glslang/MachineIndependent/Scan.h
@@ -172,7 +172,7 @@ protected:
     void advance()
     {
         ++currentChar;
-        if (currentChar >= static_cast<int>(lengths[currentSource])) {
+        if (currentChar >= static_cast<size_t>(lengths[currentSource])) {
             ++currentSource;
             if (currentSource < numSources) {
                 loc[currentSource].string = loc[currentSource - 1].string + 1;
diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp
index 617f9e21f63937b81468b470c79602ee9aff0ce7..ecf888c10d13e72e635bafd8c97497c83192c60c 100644
--- a/glslang/MachineIndependent/ShaderLang.cpp
+++ b/glslang/MachineIndependent/ShaderLang.cpp
@@ -1288,7 +1288,7 @@ public:
 };
 
 TShader::TShader(EShLanguage s) 
-    : pool(0), stage(s), preamble(""), lengths(nullptr), stringNames(nullptr)
+    : pool(0), stage(s), lengths(nullptr), stringNames(nullptr), preamble("")
 {
     infoSink = new TInfoSink;
     compiler = new TDeferredCompiler(stage, *infoSink);
diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y
index 25eba7dfa315a3693bc07d6f5d5d813c2e594872..272601420bdb9558bd6a56175876c52101b149cd 100644
--- a/glslang/MachineIndependent/glslang.y
+++ b/glslang/MachineIndependent/glslang.y
@@ -96,10 +96,13 @@ using namespace glslang;
 }
 
 %{
-    
-#pragma warning(disable : 4065)
-#pragma warning(disable : 4127)
-#pragma warning(disable : 4244)
+
+/* windows only pragma */
+#ifdef _MSC_VER
+    #pragma warning(disable : 4065)
+    #pragma warning(disable : 4127)
+    #pragma warning(disable : 4244)
+#endif
 
 #define parseContext (*pParseContext)
 #define yyerror(context, msg) context->parserError(msg)
diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp
index eabf99911f63ad8e63a0563f7e52bfb81ec2576a..eafe135383e58519baae44546d49b9ca1a29d895 100644
--- a/glslang/MachineIndependent/linkValidate.cpp
+++ b/glslang/MachineIndependent/linkValidate.cpp
@@ -540,7 +540,6 @@ void TIntermediate::checkCallGraphCycles(TInfoSink& infoSink)
 void TIntermediate::inOutLocationCheck(TInfoSink& infoSink)
 {
     // ES 3.0 requires all outputs to have location qualifiers if there is more than one output
-    bool fragOutHasLocation = false;
     bool fragOutWithNoLocation = false;
     int numFragOut = 0;
 
@@ -553,9 +552,7 @@ void TIntermediate::inOutLocationCheck(TInfoSink& infoSink)
         if (language == EShLangFragment) {
             if (qualifier.storage == EvqVaryingOut) {
                 ++numFragOut;
-                if (qualifier.hasAnyLocation())
-                    fragOutHasLocation = true;
-                else
+                if (!qualifier.hasAnyLocation())
                     fragOutWithNoLocation = true;
             }
         }
diff --git a/glslang/MachineIndependent/preprocessor/PpAtom.cpp b/glslang/MachineIndependent/preprocessor/PpAtom.cpp
index b3cb2b0781eb7aa906b28bc326856267f13fadc3..763b6b4e67b7811c8861be5d798c3aefa3b779db 100644
--- a/glslang/MachineIndependent/preprocessor/PpAtom.cpp
+++ b/glslang/MachineIndependent/preprocessor/PpAtom.cpp
@@ -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;
diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h
index 57eb9f44050fca4e02530761a1d3ddb6f5d041b0..f1d5469162a2f5953fb7366d9ef1eb3ff3564920 100644
--- a/glslang/MachineIndependent/preprocessor/PpContext.h
+++ b/glslang/MachineIndependent/preprocessor/PpContext.h
@@ -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 {
 
diff --git a/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/glslang/MachineIndependent/preprocessor/PpScanner.cpp
index d515a7b85d1dc678c0e361b0e294f62e55f850d1..ce1c88ff20743d2bbf46206b0af9e0486fe34015 100644
--- a/glslang/MachineIndependent/preprocessor/PpScanner.cpp
+++ b/glslang/MachineIndependent/preprocessor/PpScanner.cpp
@@ -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;
diff --git a/glslang/MachineIndependent/preprocessor/PpSymbols.cpp b/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
index d83f77f8b4c4742538fc5175a1032df1cd2f48c3..c2ab7c0a11e070b3fe2127d5c1b4b4dcb99adbd7 100644
--- a/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
+++ b/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
@@ -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;