From a306d77a5ef5bb629d0f595039bbb4458f8d6317 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:58:49 +0200 Subject: [PATCH] Berry fix compilation error with some compiler options (#22200) --- lib/libesp32/berry/src/be_code.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libesp32/berry/src/be_code.c b/lib/libesp32/berry/src/be_code.c index 40457e8c9..9f7cf1300 100644 --- a/lib/libesp32/berry/src/be_code.c +++ b/lib/libesp32/berry/src/be_code.c @@ -307,7 +307,7 @@ static int exp2const(bfuncinfo *finfo, bexpdesc *e) { int idx = findconst(finfo, e); /* does the constant already exist? */ if (idx == -1) { /* if not add it */ - bvalue k = {}; + bvalue k = {0}; switch (e->type) { case ETINT: k.type = BE_INT; @@ -882,7 +882,7 @@ void be_code_index(bfuncinfo *finfo, bexpdesc *c, bexpdesc *k) void be_code_class(bfuncinfo *finfo, bexpdesc *dst, bclass *c) { int src; - bvalue var = {}; + bvalue var = {0}; var_setclass(&var, c); /* new var of CLASS type */ src = newconst(finfo, &var); /* allocate a new constant and return kreg */ if (dst->type == ETLOCAL) { /* if target is a local variable, just assign */ @@ -965,7 +965,7 @@ void be_code_raise(bfuncinfo *finfo, bexpdesc *e1, bexpdesc *e2) void be_code_implicit_class(bfuncinfo *finfo, bexpdesc *e, bclass *c) { - bvalue k = {}; + bvalue k = {0}; k.type = BE_CLASS; k.v.p = c; int idx = newconst(finfo, &k); /* create new constant */