summaryrefslogtreecommitdiffstats
path: root/source/core/slang-string.h
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-08-16 13:27:00 +0800
committerGitHub <noreply@github.com>2023-08-15 22:27:00 -0700
commit00e2bf1cd3e30cd6560222f620b7f66fa55c1549 (patch)
treedbb6270062bba6f0cbb9355438c822e3c97ff2f9 /source/core/slang-string.h
parent9ec30a1d5ac99ec08f83ad262156a671c35a287d (diff)
squash warnings (#3113)
* Remove unused variables * Silence gcc out of bounds warnings * Squash strict-aliasing warnings It is still a naughty thing to be casting to T like this though * Correct equality check when val is nullptr --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/core/slang-string.h')
-rw-r--r--source/core/slang-string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/core/slang-string.h b/source/core/slang-string.h
index 3f401b7bb..7c43ad647 100644
--- a/source/core/slang-string.h
+++ b/source/core/slang-string.h
@@ -56,6 +56,7 @@ namespace Slang
buffer[i++] = (char)(digit - 10 + 'A');
} while ((val /= radix) > 0);
+ SLANG_ASSERT(i >= 0);
while(i < padTo)
buffer[i++] = '0';