diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-08-16 13:27:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-15 22:27:00 -0700 |
| commit | 00e2bf1cd3e30cd6560222f620b7f66fa55c1549 (patch) | |
| tree | dbb6270062bba6f0cbb9355438c822e3c97ff2f9 /source/core/slang-string.h | |
| parent | 9ec30a1d5ac99ec08f83ad262156a671c35a287d (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.h | 1 |
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'; |
