From 09d8e048d2264d89886cda8e87e8a452d4f913c1 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 17 Nov 2022 03:33:10 +0800 Subject: Squash warnings (#2515) * Don't use uname -p It's not portable (doesn't work on my machine) * Disable maybe-uninitialized warning on gcc Only false positives at the moment * Squash warning in miniz Allow it to use 64 bit file handing functions with gcc * Use noreturn c++11 attribute in SLANG_RETURN_NEVER * Squash uninitialized variable warnings * Squash const char/char conversion warnings Co-authored-by: Yong He --- source/slang/slang-ir-diff-jvp.cpp | 1 + source/slang/slang-legalize-types.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-ir-diff-jvp.cpp b/source/slang/slang-ir-diff-jvp.cpp index 7f5979a87..1597c80d1 100644 --- a/source/slang/slang-ir-diff-jvp.cpp +++ b/source/slang/slang-ir-diff-jvp.cpp @@ -2515,6 +2515,7 @@ struct BackwardDiffTranscriber newInst = builder->emitDiv(resultType, primalLeft, primalRight); break; default: + newInst = nullptr; getSink()->diagnose(origArith->sourceLoc, Diagnostics::unimplemented, "this arithmetic instruction cannot be differentiated"); diff --git a/source/slang/slang-legalize-types.h b/source/slang/slang-legalize-types.h index 600f1d7a7..a24caf960 100644 --- a/source/slang/slang-legalize-types.h +++ b/source/slang/slang-legalize-types.h @@ -73,7 +73,7 @@ struct LegalType Flavor flavor = Flavor::none; RefPtr obj; - IRType* irType; + IRType* irType = nullptr; static LegalType simple(IRType* type) { -- cgit v1.2.3