From 00e2bf1cd3e30cd6560222f620b7f66fa55c1549 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 16 Aug 2023 13:27:00 +0800 Subject: 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 --- source/core/slang-string.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/core') 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'; -- cgit v1.2.3