From 2ff397c00e15504da9835d4f219c83dfe7919a2c Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 21 Feb 2021 14:20:47 -0800 Subject: [PATCH] util/fossilize_db: Fix compile error with clang ../src/util/fossilize_db.c:178:58: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer] char hash_str[FOSSILIZE_BLOB_HASH_LENGTH + 1] = {}; Fixes: eca6bb9540d ("util/fossilize_db: add basic fossilize db util to read/write shader caches") Signed-off-by: Rob Clark Reviewed-by: Timothy Arceri Part-of: --- src/util/fossilize_db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/fossilize_db.c b/src/util/fossilize_db.c index d594cfcb834..27939d8b2fa 100644 --- a/src/util/fossilize_db.c +++ b/src/util/fossilize_db.c @@ -175,7 +175,7 @@ load_foz_dbs(struct foz_db *foz_db, FILE *db_idx, uint8_t file_idx, header->payload_size != sizeof(uint64_t)) break; - char hash_str[FOSSILIZE_BLOB_HASH_LENGTH + 1] = {}; + char hash_str[FOSSILIZE_BLOB_HASH_LENGTH + 1] = {0}; memcpy(hash_str, bytes_to_read, FOSSILIZE_BLOB_HASH_LENGTH); struct foz_db_entry *entry = ralloc(foz_db->mem_ctx,