Unverified Commit bd0f5ad2 by John Kessenich Committed by GitHub

Merge pull request #1733 from null77/fix-msvc-warn

Suppress MSVC warning about unused variable.
parents 49dff5bf 099a80dd
...@@ -152,6 +152,7 @@ source_set("glslang_sources") { ...@@ -152,6 +152,7 @@ source_set("glslang_sources") {
if (is_win && !is_clang) { if (is_win && !is_clang) {
cflags = [ cflags = [
"/wd4018", # signed/unsigned mismatch "/wd4018", # signed/unsigned mismatch
"/wd4189", # local variable is initialized but not referenced
] ]
} }
......
...@@ -258,6 +258,7 @@ void Builder::postProcess(Instruction& inst) ...@@ -258,6 +258,7 @@ void Builder::postProcess(Instruction& inst)
assert(inst.getNumOperands() >= 3); assert(inst.getNumOperands() >= 3);
unsigned int memoryAccess = inst.getImmediateOperand((inst.getOpCode() == OpStore) ? 2 : 1); unsigned int memoryAccess = inst.getImmediateOperand((inst.getOpCode() == OpStore) ? 2 : 1);
assert(memoryAccess & MemoryAccessAlignedMask); assert(memoryAccess & MemoryAccessAlignedMask);
static_cast<void>(memoryAccess);
// Compute the index of the alignment operand. // Compute the index of the alignment operand.
int alignmentIdx = 2; int alignmentIdx = 2;
if (inst.getOpCode() == OpStore) if (inst.getOpCode() == OpStore)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment