diff options
author | JF Bastien <github@jfbastien.com> | 2015-12-22 13:05:14 -0800 |
---|---|---|
committer | JF Bastien <github@jfbastien.com> | 2015-12-22 13:05:14 -0800 |
commit | 4726dcfd02ca4bea786fe4b6ef4629e3e2a1561d (patch) | |
tree | e23958b5e4ad9ea6e7acac10b8234f37740da01b | |
parent | afd2e66106d08792f54aea7ddfa408853ce229ed (diff) | |
parent | 8e3fa9c80d50a6b3e883d218aaaddf02ff4b94d3 (diff) | |
download | binaryen-4726dcfd02ca4bea786fe4b6ef4629e3e2a1561d.tar.gz binaryen-4726dcfd02ca4bea786fe4b6ef4629e3e2a1561d.tar.bz2 binaryen-4726dcfd02ca4bea786fe4b6ef4629e3e2a1561d.zip |
Merge pull request #27 from WebAssembly/unused
Fix unused variable / function warnings.
-rw-r--r-- | src/asm2wasm.h | 10 | ||||
-rw-r--r-- | src/s2wasm.h | 4 | ||||
-rw-r--r-- | src/wasm-s-parser.h | 3 |
3 files changed, 4 insertions, 13 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 8bed531de..2d92efbfd 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -33,14 +33,6 @@ extern int debug; // wasm::debug is set in main(), typically from an env var // Utilities -static void abort_on(std::string why) { - std::cerr << why << '\n'; - abort(); -} -static void abort_on(std::string why, int x) { - std::cerr << why << ' ' << x << '\n'; - abort(); -} static void abort_on(std::string why, Ref element) { std::cerr << why << ' '; element->stringify(std::cerr); @@ -665,7 +657,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { } else if (curr[0] == RETURN) { // exports Ref object = curr[1]; - Ref contents = curr[1][1]; + Ref contents = object[1]; for (unsigned k = 0; k < contents->size(); k++) { Ref pair = contents[k]; IString key = pair[0]->getIString(); diff --git a/src/s2wasm.h b/src/s2wasm.h index 5801f2620..34afbef52 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -333,7 +333,7 @@ private: } void parseGlobl() { - Name name = getStr(); + (void)getStr(); skipWhitespace(); } @@ -432,7 +432,7 @@ private: if (assign.isNull() || assign.str[1] == 'd') { // discard bstack.back()->list.push_back(curr); } else if (assign.str[1] == 'p') { // push - estack.push_back(curr); + push(curr); } else { // set to a local auto set = allocator.alloc<SetLocal>(); set->name = assign; diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 4f0bd199b..5440faecc 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -111,14 +111,13 @@ public: // class SExpressionParser { - char *beginning; char* input; MixedArena allocator; public: // Assumes control of and modifies the input. - SExpressionParser(char* input) : beginning(input), input(input) { + SExpressionParser(char* input) : input(input) { root = nullptr; while (!root) { // keep parsing until we pass an initial comment root = parseInnerList(); |