diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-09 23:21:44 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-09 23:21:44 -0500 |
| commit | fcd1381e3d619b39d0830fc6019078a9282325b3 (patch) | |
| tree | 9b5070435fa53121c804d0b162653285ce20e7eb /builtins/array.c | |
| parent | beb929484b32eda79d0cc3f272120f1c852af296 (diff) | |
Minor cleanups to get compilation working on clang
Diffstat (limited to 'builtins/array.c')
| -rw-r--r-- | builtins/array.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtins/array.c b/builtins/array.c index 8ee771ea..07814f66 100644 --- a/builtins/array.c +++ b/builtins/array.c @@ -321,7 +321,8 @@ public uint32_t Array__hash(const array_t *arr, const TypeInfo *type) const TypeInfo *item = type->ArrayInfo.item; if (item->tag == PointerInfo || (item->tag == CustomInfo && item->CustomInfo.hash == NULL)) { // Raw data hash int64_t item_size = item->size; - uint8_t hash_batch[4 + 8*item_size] = {}; + uint8_t hash_batch[4 + 8*item_size]; + memset(hash_batch, 0, sizeof(hash_batch)); uint8_t *p = hash_batch, *end = hash_batch + sizeof(hash_batch); int64_t length = arr->length; *p = (uint32_t)length; |
