From 261548a11d7dab998f4a36dceef7a03f3e5ff2d3 Mon Sep 17 00:00:00 2001 From: Pompolic <pompolic@special-circumstanc.es> Date: Thu, 20 Feb 2020 21:35:46 +0100 Subject: [PATCH] Cleanup compile errors --- pdf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pdf.c b/pdf.c index cf0d960..04e2666 100644 --- a/pdf.c +++ b/pdf.c @@ -277,9 +277,7 @@ HParsedToken * act_ahexstream(const HParseResult *p, void *u) { uint8_t *result_bytes; - size_t chunk_number; size_t required_bytes; - size_t out_pos = 0; HCountedArray *seq = H_CAST_SEQ(p->ast); HParsedToken *res; @@ -473,7 +471,7 @@ act_a85string(const HParseResult *p, void *u) /* Special-case: last chunk before EOD may be 4, 3, 2 or 1 bytes * The latter two happening if the group was parsed from a partial * group consisting less than 5 chars */ - HBytes *last_chunk = seq->elements[seq->used-1]; + HBytes *last_chunk = &H_CAST_BYTES(seq->elements[seq->used-1]); required_bytes = (chunk_number * 4 + last_chunk->len); result_bytes = h_arena_malloc(p->arena, sizeof(uint8_t) * required_bytes); @@ -481,7 +479,7 @@ act_a85string(const HParseResult *p, void *u) /* memcpy all but the last group's bytes into a single array */ for (size_t i = 0; i < seq->used-1; ++i) { - HBytes *chunk = H_CAST_BYTES(seq->elements[i]); + HBytes *chunk = &H_CAST_BYTES(seq->elements[i]); assert(out_pos < required_bytes); memcpy(&(result_bytes[out_pos]), chunk->token, 4); out_pos += 4; -- GitLab