From 296512de70f841d5d6644621e27f3d218ff552af Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 14 Apr 2009 09:02:13 -0600 Subject: [PATCH 1/2] fix misleading statement in readme.txt --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 3d861072c7..49374fe80c 100644 --- a/readme.txt +++ b/readme.txt @@ -417,8 +417,8 @@ architecture-specific parameters. Step 8: Write a driver which starts the VM and runs the desired main method. Note the bootimageBin function, which will be called by the -VM to get a handle to the embedded jar. We tell the VM about this -function via the "avian.bootimage" property. +VM to get a handle to the embedded boot image. We tell the VM about +this function via the "avian.bootimage" property. Note also that this example includes no resources besides class files. If our application loaded resources such as images and properties From 79558e7e34580406527e20ed25bf65e6ce0bae54 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 22 May 2009 18:21:11 -0600 Subject: [PATCH 2/2] fix GCC 4.4 warnings --- src/stream.h | 6 ++++++ src/type-generator.cpp | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/stream.h b/src/stream.h index bf59e41865..418f882900 100644 --- a/src/stream.h +++ b/src/stream.h @@ -44,6 +44,12 @@ 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; + client->handleError(); } else { memcpy(data, this->data + position_, size); diff --git a/src/type-generator.cpp b/src/type-generator.cpp index fbb0db7452..2ede6fd9c5 100644 --- a/src/type-generator.cpp +++ b/src/type-generator.cpp @@ -1560,11 +1560,7 @@ writeAccessor(Output* out, Object* member, Object* offset, bool unsafe = false) } } - if (memberOwner(member)->type == Object::Pod) { - out->write(">(o->body"); - } else { - out->write(">(reinterpret_cast(o)"); - } + out->write(">(reinterpret_cast(o)"); if (endsWith("[0]", typeName) or (member->type != Object::Scalar and memberTypeObject(member)))