diff --git a/src/machine.cpp b/src/machine.cpp index 245b30577b..a4bf4c1d0e 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -718,7 +718,6 @@ parseUtf8NonAscii(Thread* t, Stream& s, object bytesSoFar, unsigned byteCount, value = v; } - charArrayBody(t, value, vi) = 0; return value; } @@ -4239,8 +4238,8 @@ parseUtf8(Thread* t, const char* data, unsigned length) public: Client(Thread* t): t(t) { } - virtual void NO_RETURN handleError() { - vm::abort(t); + virtual void handleError() { + // vm::abort(t); } private: diff --git a/src/stream.h b/src/stream.h index bd7542e496..3e438d465e 100644 --- a/src/stream.h +++ b/src/stream.h @@ -19,7 +19,7 @@ class Stream { public: class Client { public: - virtual void NO_RETURN handleError() = 0; + virtual void handleError() = 0; }; Stream(Client* client, const uint8_t* data, unsigned size): @@ -44,11 +44,7 @@ class Stream { void read(uint8_t* data, unsigned size) { if (size > this->size - position_) { - // GCC 4.4 will give us an uninitialized value warning in read1 - // unless we do this: (it's smart enough to track data flow - // across functions but not smart enough to see we won't return - // from Client::handleError) - *data = 0; + memset(data, 0, size); client->handleError(); } else {