Skip to content

Commit

Permalink
Fix minor code defects
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
  • Loading branch information
clover2123 authored and ksh8281 committed Sep 15, 2023
1 parent 3d39641 commit 27aaed1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/parser/WASMParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,6 @@ class WASMBinaryReader : public wabt::WASMBinaryReaderDelegate {

m_elementModuleFunction = nullptr;
m_elementTableIndex = 0;
m_elementFunctionIndex.clear();
m_segmentMode = Walrus::SegmentMode::None;
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/MathOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ T saturatingRoundingQMul(ExecutionState& state, T lhs, T rhs)
{
constexpr int size_in_bits = sizeof(T) * 8;
int round_const = 1 << (size_in_bits - 2);
int64_t product = lhs * rhs;
int64_t product = (int64_t)lhs * rhs;
product += round_const;
product >>= (size_in_bits - 1);
return saturate<T, int64_t>(product);
Expand Down
3 changes: 2 additions & 1 deletion third_party/wabt/include/wabt/ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,8 @@ struct Table {
typedef std::vector<ExprList> ExprListVector;

struct ElemSegment {
explicit ElemSegment(nonstd::string_view name) : name(name) {}
explicit ElemSegment(nonstd::string_view name)
: name(name), elem_type(Type::Void) {}
uint8_t GetFlags(const Module*) const;

SegmentKind kind = SegmentKind::Active;
Expand Down
4 changes: 2 additions & 2 deletions third_party/wabt/src/binary-writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ class BinaryWriter {
bool has_data_segment_instruction_ = false;

CodeMetadataSections code_metadata_sections_;
Offset cur_func_start_offset_;
Index cur_func_index_;
Offset cur_func_start_offset_ = 0;
Index cur_func_index_ = 0;
};

static uint8_t log2_u32(uint32_t x) {
Expand Down

0 comments on commit 27aaed1

Please sign in to comment.