From 49e2d06921fd276c9e8c29cb76ee1e6ab743b1e4 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Tue, 7 Jul 2020 07:47:48 +0200 Subject: [PATCH] macos: initialize macho struct with memset which removes a clang warning on macOS. --- tccmacho.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tccmacho.c b/tccmacho.c index 6ad127d4..93dee3b1 100644 --- a/tccmacho.c +++ b/tccmacho.c @@ -784,7 +784,9 @@ ST_FUNC int macho_output_file(TCCState *s1, const char *filename) int fd, mode, file_type; FILE *fp; int i, ret = -1; - struct macho mo = {0}; + struct macho mo; + + (void)memset(&mo, 0, sizeof(mo)); file_type = s1->output_type; if (file_type == TCC_OUTPUT_OBJ)