Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
tyfkda committed Sep 8, 2023
1 parent 56b22d1 commit 1d73cba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/wcc/gen_wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

static void gen_lval(Expr *expr);

void add_code(const unsigned char* buf, size_t size) {
void add_code(const unsigned char *buf, size_t size) {
data_append(CODE, buf, size);
}

Expand Down Expand Up @@ -432,7 +432,7 @@ static void gen_funcall(Expr *expr) {
assert(index >= 0);
ADD_CODE(OP_CALL_INDIRECT);
ADD_ULEB128(index); // signature index
ADD_ULEB128(0); // table index
ADD_ULEB128(0); // table index
}

if (sarg_siz > 0 || vaarg_bufsiz > 0) {
Expand Down
6 changes: 3 additions & 3 deletions src/wcc/wcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static void construct_initial_value(DataStorage *ds, const Type *type, const Ini
int count = 0;
int offset = 0;
for (int i = 0, n = sinfo->member_count; i < n; ++i) {
const MemberInfo* member = &sinfo->members[i];
const MemberInfo *member = &sinfo->members[i];
if (member->bitfield.width > 0) {
i = construct_initial_value_bitfield(ds, sinfo, init, i, &offset);
++count;
Expand All @@ -299,7 +299,7 @@ static void construct_initial_value(DataStorage *ds, const Type *type, const Ini
}
}
if (sinfo->is_union && count <= 0) {
const MemberInfo* member = &sinfo->members[0];
const MemberInfo *member = &sinfo->members[0];
construct_initial_value(ds, member->type, NULL);
offset += type_size(member->type);
}
Expand Down Expand Up @@ -330,7 +330,7 @@ static void construct_data_segment(DataStorage *ds) {
for (int it = 0; (it = table_iterate(&gvar_info_table, it, &name, (void**)&info)) != -1; ) {
const VarInfo *varinfo = info->varinfo;
if ((is_prim_type(varinfo->type) && !(varinfo->storage & VS_REF_TAKEN)) ||
varinfo->global.init == NULL)
varinfo->global.init == NULL)
continue;
uint32_t adr = info->non_prim.address;
assert(adr >= address);
Expand Down

0 comments on commit 1d73cba

Please sign in to comment.