mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
Made from https://github.com/WebAssembly/binaryen/pull/1400
|
|
|
|
Should probably just be removed when the package version is bumped.
|
|
|
|
- Daniel Isaksen <d@duniel.no>
|
|
|
|
diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp
|
|
index 3f70e0388e..cecae7a819 100644
|
|
--- a/src/tools/asm2wasm.cpp
|
|
+++ b/src/tools/asm2wasm.cpp
|
|
@@ -87,7 +87,7 @@ int main(int argc, const char *argv[]) {
|
|
[&trapMode](Options *o, const std::string &argument) {
|
|
try {
|
|
trapMode = trapModeFromString(argument);
|
|
- } catch (std::invalid_argument e) {
|
|
+ } catch (std::invalid_argument& e) {
|
|
std::cerr << "Error: " << e.what() << "\n";
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
diff --git a/src/tools/s2wasm.cpp b/src/tools/s2wasm.cpp
|
|
index 6e7b2c05e2..3643993b7f 100644
|
|
--- a/src/tools/s2wasm.cpp
|
|
+++ b/src/tools/s2wasm.cpp
|
|
@@ -92,7 +92,7 @@ int main(int argc, const char *argv[]) {
|
|
[&trapMode](Options *o, const std::string &argument) {
|
|
try {
|
|
trapMode = trapModeFromString(argument);
|
|
- } catch (std::invalid_argument e) {
|
|
+ } catch (std::invalid_argument& e) {
|
|
std::cerr << "Error: " << e.what() << "\n";
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
|
|
index 0de3edf3f6..78a150f814 100644
|
|
--- a/src/wasm/wasm-s-parser.cpp
|
|
+++ b/src/wasm/wasm-s-parser.cpp
|
|
@@ -1408,9 +1408,9 @@ Name SExpressionWasmBuilder::getLabel(Element& s) {
|
|
uint64_t offset;
|
|
try {
|
|
offset = std::stoll(s.c_str(), nullptr, 0);
|
|
- } catch (std::invalid_argument) {
|
|
+ } catch (std::invalid_argument&) {
|
|
throw ParseException("invalid break offset");
|
|
- } catch (std::out_of_range) {
|
|
+ } catch (std::out_of_range&) {
|
|
throw ParseException("out of range break offset");
|
|
}
|
|
if (offset > nameMapper.labelStack.size()) throw ParseException("invalid label", s.line, s.col);
|