mirror of
https://github.com/janet-lang/janet
synced 2025-01-26 15:16:51 +00:00
Address compiler warning on macos.
This commit is contained in:
parent
1d0e862129
commit
5b82b9e101
@ -731,7 +731,10 @@ static timeint_t entry_getint(Janet env_entry, char *field) {
|
|||||||
static Janet os_mktime(int32_t argc, Janet *argv) {
|
static Janet os_mktime(int32_t argc, Janet *argv) {
|
||||||
janet_arity(argc, 1, 2);
|
janet_arity(argc, 1, 2);
|
||||||
time_t t;
|
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) &&
|
if (!janet_checktype(argv[0], JANET_TABLE) &&
|
||||||
!janet_checktype(argv[0], JANET_STRUCT))
|
!janet_checktype(argv[0], JANET_STRUCT))
|
||||||
|
Loading…
Reference in New Issue
Block a user