diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-05-08 22:31:43 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-08 21:02:47 +0200 |
commit | 0901b1712645829b48ecd329c43c2f42fd61a879 (patch) | |
tree | c204212cbe50791025cf612a2b49bd81df964457 | |
parent | e333b600646fddb3e10cff44830b29cc8c90c406 (diff) | |
download | serenity-0901b1712645829b48ecd329c43c2f42fd61a879.zip |
LibJS: Be a bit more explicit about sizeof(buf) / sizeof(FlatPtr)
This (seemingly) no-op cast communicates our intention to clang
-rw-r--r-- | Libraries/LibJS/Heap/Heap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Heap/Heap.cpp b/Libraries/LibJS/Heap/Heap.cpp index 53d6c6377b..f1739531e9 100644 --- a/Libraries/LibJS/Heap/Heap.cpp +++ b/Libraries/LibJS/Heap/Heap.cpp @@ -135,7 +135,7 @@ void Heap::gather_conservative_roots(HashTable<Cell*>& roots) const FlatPtr* raw_jmp_buf = reinterpret_cast<const FlatPtr*>(buf); - for (size_t i = 0; i < sizeof(buf) / sizeof(FlatPtr); i += sizeof(FlatPtr)) + for (size_t i = 0; i < ((size_t)sizeof(buf)) / sizeof(FlatPtr); i += sizeof(FlatPtr)) possible_pointers.set(raw_jmp_buf[i]); FlatPtr stack_base; |