diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/BRegex.cc | 3 | ||||
-rw-r--r-- | src/Input.cc | 2 | ||||
-rw-r--r-- | src/Output.cc | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/BRegex.cc b/src/BRegex.cc index 1ada2f1..d755e04 100644 --- a/src/BRegex.cc +++ b/src/BRegex.cc @@ -35,10 +35,9 @@ Balau::String Balau::Regex::getError(int err) const { char * t; s = regerror(err, &m_regex, NULL, 0); - t = (char *) malloc(s); + t = (char *) alloca(s); regerror(err, &m_regex, t, s); String r(t, s - 1); - free(t); return r; } diff --git a/src/Input.cc b/src/Input.cc index a86468e..ebcffb3 100644 --- a/src/Input.cc +++ b/src/Input.cc @@ -275,6 +275,8 @@ ssize_t Balau::Input::read(void * buf, size_t count) throw (GeneralException) { } IAssert(false, "Shouldn't end up there."); + + return -1; } bool Balau::Input::isClosed() { diff --git a/src/Output.cc b/src/Output.cc index 9f5e370..3ca97b0 100644 --- a/src/Output.cc +++ b/src/Output.cc @@ -275,6 +275,8 @@ ssize_t Balau::Output::write(const void * buf, size_t count) throw (GeneralExcep } IAssert(false, "Shouldn't end up there."); + + return -1; } bool Balau::Output::isClosed() { |