Skip to content

Commit

Permalink
[PMC] Fixed a compiler warning in ImageIO PMC's set_string_native VTA…
Browse files Browse the repository at this point in the history
…BLE.

git-svn-id: https://svn.parrot.org/parrot/trunk@45483 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
chromatic committed Apr 9, 2010
1 parent 506e331 commit 8ceb566
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/pmc/imageio.pmc
Expand Up @@ -612,11 +612,12 @@ Removes and returns a reference to a pmc from the start of the image.
}

VTABLE void set_string_native(STRING *image) {
PMC *unused;
const UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
int unpacked_length;

PARROT_IMAGEIO(SELF)->what = VISIT_THAW_NORMAL;
PARROT_IMAGEIO(SELF)->buffer = (Buffer *)image;
PARROT_IMAGEIO(SELF)->what = VISIT_THAW_NORMAL;
PARROT_IMAGEIO(SELF)->buffer = (Buffer *)image;

PARROT_ASSERT(image->_bufstart == image->strstart);

Expand All @@ -627,16 +628,14 @@ Removes and returns a reference to a pmc from the start of the image.
unpacked_length = PackFile_unpack(interp, PARROT_IMAGEIO(SELF)->pf,
GET_VISIT_CURSOR(SELF), PARROT_IMAGEIO(SELF)->input_length);

if (!unpacked_length) {
if (unpacked_length)
INC_VISIT_CURSOR(SELF, header_length);
else
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_STRING_REPRESENTATION,
"PackFile header failed during unpack");
}
else {
INC_VISIT_CURSOR(SELF, header_length);
}

visit_todo_list_thaw(INTERP, SELF);
unused = visit_todo_list_thaw(INTERP, SELF);
Parrot_visit_loop_visit(INTERP, SELF);

/* we're done reading the image */
Expand Down

0 comments on commit 8ceb566

Please sign in to comment.