From 5b82b9e101d4a52cb698151832124f32da53d530 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 4 Apr 2020 13:34:16 -0500 Subject: [PATCH] Address compiler warning on macos. --- src/core/os.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/os.c b/src/core/os.c index cd3c9c53..fa006382 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -731,7 +731,10 @@ static timeint_t entry_getint(Janet env_entry, char *field) { static Janet os_mktime(int32_t argc, Janet *argv) { janet_arity(argc, 1, 2); time_t t; - struct tm t_info = { 0 }; + struct tm t_info; + + /* Use memset instead of = {0} to silence paranoid warning in macos */ + memset(&t_info, 0, sizeof(t_info)); if (!janet_checktype(argv[0], JANET_TABLE) && !janet_checktype(argv[0], JANET_STRUCT))