summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2022-11-17 03:33:10 +0800
committerGitHub <noreply@github.com>2022-11-16 11:33:10 -0800
commit09d8e048d2264d89886cda8e87e8a452d4f913c1 (patch)
treede925c032837ae21e7693e3c44a1c825c5fd3e6e /source
parent8d500475bb11b025960bf211d505540867ce68e7 (diff)
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 <yonghe@outlook.com>
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-diff-jvp.cpp1
-rw-r--r--source/slang/slang-legalize-types.h2
2 files changed, 2 insertions, 1 deletions
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<RefObject> obj;
- IRType* irType;
+ IRType* irType = nullptr;
static LegalType simple(IRType* type)
{