diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-10 23:47:52 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-10 23:47:52 +0100 |
| commit | 1e3a4e9ff4d9963aa77dc6135f351f90d927e9e0 (patch) | |
| tree | e8d126c4def527034f4504cecf74202c5b03dcff | |
| parent | 6b865a70c0f29e5ca9e13fae4a2a18406f44f4ee (diff) | |
Do not explicitly initialize static variables to zero
This is redundant according to the C standard.
| -rw-r--r-- | src/op/br.c | 2 | ||||
| -rw-r--r-- | src/op/br_if.c | 2 | ||||
| -rw-r--r-- | src/op/call.c | 2 | ||||
| -rw-r--r-- | src/op/call_indirect.c | 2 | ||||
| -rw-r--r-- | src/op/check/br_table.c | 2 | ||||
| -rw-r--r-- | src/op/end.c | 2 | ||||
| -rw-r--r-- | src/op/get_global.c | 2 | ||||
| -rw-r--r-- | src/op/get_local.c | 2 | ||||
| -rw-r--r-- | src/op/i32_const.c | 2 | ||||
| -rw-r--r-- | src/op/set_global.c | 2 | ||||
| -rw-r--r-- | src/op/unreachable.c | 2 |
11 files changed, 11 insertions, 11 deletions
diff --git a/src/op/br.c b/src/op/br.c index 83ceca7..dd0066f 100644 --- a/src/op/br.c +++ b/src/op/br.c @@ -29,7 +29,7 @@ static enum nw_state get_relative_depth(struct nw_interp *const i) void nwp_op_br(struct nw_interp *const i) { - static const struct nw_i_sm_br b = {0}; + static const struct nw_i_sm_br b; i->next = get_relative_depth; i->sm.br = b; diff --git a/src/op/br_if.c b/src/op/br_if.c index 5b6b5a2..6eca18a 100644 --- a/src/op/br_if.c +++ b/src/op/br_if.c @@ -88,7 +88,7 @@ static enum nw_state get_relative_depth(struct nw_interp *const i) void nwp_op_br_if(struct nw_interp *const i) { - static const struct nw_i_sm_br_if b = {0}; + static const struct nw_i_sm_br_if b; i->next = get_relative_depth; i->sm.br_if = b; diff --git a/src/op/call.c b/src/op/call.c index 11a9183..476729d 100644 --- a/src/op/call.c +++ b/src/op/call.c @@ -43,7 +43,7 @@ static enum nw_state get_index(struct nw_interp *const i) void nwp_op_call(struct nw_interp *const i) { - static const struct nw_i_sm_call c = {0}; + static const struct nw_i_sm_call c; i->sm.call = c; i->next = get_index; diff --git a/src/op/call_indirect.c b/src/op/call_indirect.c index f41a14d..2c1de5d 100644 --- a/src/op/call_indirect.c +++ b/src/op/call_indirect.c @@ -57,7 +57,7 @@ static enum nw_state get_index(struct nw_interp *const i) void nwp_op_call_indirect(struct nw_interp *const i) { - static const struct nw_i_sm_call_indirect ci = {0}; + static const struct nw_i_sm_call_indirect ci; i->sm.call_indirect = ci; i->next = get_index; diff --git a/src/op/check/br_table.c b/src/op/check/br_table.c index d104669..5d61b54 100644 --- a/src/op/check/br_table.c +++ b/src/op/check/br_table.c @@ -71,7 +71,7 @@ static enum nw_state get_target_count(struct nw_mod *const m) void nwp_op_check_br_table(struct nw_mod *const m) { - static const struct nw_sm_c_t t = {0}; + static const struct nw_sm_c_t t; m->sm.code.u.target = t; m->next = get_target_count; diff --git a/src/op/end.c b/src/op/end.c index 9eb575d..ca9f109 100644 --- a/src/op/end.c +++ b/src/op/end.c @@ -60,7 +60,7 @@ static enum nw_state get_offset(struct nw_interp *const i) void nwp_op_end(struct nw_interp *const i) { - static const struct nw_i_sm_end e = {0}; + static const struct nw_i_sm_end e; i->sm.end = e; i->next = get_offset; diff --git a/src/op/get_global.c b/src/op/get_global.c index eb701b5..a87ff83 100644 --- a/src/op/get_global.c +++ b/src/op/get_global.c @@ -86,7 +86,7 @@ static enum nw_state get_index(struct nw_interp *const i) void nwp_op_get_global(struct nw_interp *const i) { - static const struct nw_i_sm_get_global g = {0}; + static const struct nw_i_sm_get_global g; i->sm.get_global = g; i->next = get_index; diff --git a/src/op/get_local.c b/src/op/get_local.c index 6a9a42a..56b742f 100644 --- a/src/op/get_local.c +++ b/src/op/get_local.c @@ -143,7 +143,7 @@ static enum nw_state get_index(struct nw_interp *const i) void nwp_op_get_local(struct nw_interp *const i) { - static const struct nw_i_sm_get_local gl = {0}; + static const struct nw_i_sm_get_local gl; i->sm.get_local = gl; i->next = get_index; diff --git a/src/op/i32_const.c b/src/op/i32_const.c index 80dc9dd..d376598 100644 --- a/src/op/i32_const.c +++ b/src/op/i32_const.c @@ -51,7 +51,7 @@ static enum nw_state get_value(struct nw_interp *const i) void nwp_op_i32_const(struct nw_interp *const i) { - static const struct nw_i_sm_i32_const c = {0}; + static const struct nw_i_sm_i32_const c; i->next = get_value; i->sm.i32_const = c; diff --git a/src/op/set_global.c b/src/op/set_global.c index 9448c32..6eb3150 100644 --- a/src/op/set_global.c +++ b/src/op/set_global.c @@ -115,7 +115,7 @@ static enum nw_state get_index(struct nw_interp *const i) void nwp_op_set_global(struct nw_interp *const i) { - static const struct nw_i_sm_set_global g = {0}; + static const struct nw_i_sm_set_global g; i->sm.set_global = g; i->next = get_index; diff --git a/src/op/unreachable.c b/src/op/unreachable.c index 6ecd374..6028ae9 100644 --- a/src/op/unreachable.c +++ b/src/op/unreachable.c @@ -31,7 +31,7 @@ static enum nw_state tell(struct nw_interp *const i) void nwp_op_unreachable(struct nw_interp *const i) { - static const struct nw_i_sm_unreachable u = {0}; + static const struct nw_i_sm_unreachable u; i->sm.unreachable = u; i->next = tell; |
