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

Suppress MSVC warning about unused variable.
This commit is contained in:
John Kessenich 2019-03-18 23:41:27 +07:00 committed by GitHub
commit bd0f5ad278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -152,6 +152,7 @@ source_set("glslang_sources") {
if (is_win && !is_clang) {
cflags = [
"/wd4018", # signed/unsigned mismatch
"/wd4189", # local variable is initialized but not referenced
]
}

View File

@ -258,6 +258,7 @@ void Builder::postProcess(Instruction& inst)
assert(inst.getNumOperands() >= 3);
unsigned int memoryAccess = inst.getImmediateOperand((inst.getOpCode() == OpStore) ? 2 : 1);
assert(memoryAccess & MemoryAccessAlignedMask);
static_cast<void>(memoryAccess);
// Compute the index of the alignment operand.
int alignmentIdx = 2;
if (inst.getOpCode() == OpStore)