summaryrefslogtreecommitdiffstatshomepage
path: root/extmod
diff options
context:
space:
mode:
Diffstat (limited to 'extmod')
-rw-r--r--extmod/moductypes.c4
-rw-r--r--extmod/modzlibd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 0f28a34688..73a8db7cc0 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -261,10 +261,10 @@ STATIC inline mp_obj_t get_unaligned(uint val_type, void *p, int big_endian) {
}
}
-STATIC inline void set_unaligned(uint val_type, void *p, int big_endian, mp_obj_t val) {
+STATIC inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) {
char struct_type = big_endian ? '>' : '<';
static const char type2char[8] = "BbHhIiQq";
- mp_binary_set_val(struct_type, type2char[val_type], val, (byte**)&p);
+ mp_binary_set_val(struct_type, type2char[val_type], val, &p);
}
static inline mp_uint_t get_aligned_basic(uint val_type, void *p) {
diff --git a/extmod/modzlibd.c b/extmod/modzlibd.c
index dbf992f919..696b7c8ecf 100644
--- a/extmod/modzlibd.c
+++ b/extmod/modzlibd.c
@@ -64,7 +64,7 @@ STATIC mp_obj_t mod_zlibd_decompress(uint n_args, mp_obj_t *args) {
size_t in_buf_sz = bufinfo.len - in_buf_ofs;
DEBUG_printf("tinfl in: in_ofs=%d in_sz=%d dst_ofs=%d, dst_sz=%d\n", in_buf_ofs, in_buf_sz, dst_buf_ofs, dst_buf_sz);
tinfl_status st = tinfl_decompress(decomp,
- bufinfo.buf + in_buf_ofs, &in_buf_sz,
+ (mz_uint8*) bufinfo.buf + in_buf_ofs, &in_buf_sz,
out, out + dst_buf_ofs, &dst_buf_sz,
TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | TINFL_FLAG_PARSE_ZLIB_HEADER);
DEBUG_printf("tinfl out: st=%d, in_sz=%d, out_sz=%d\n", st, in_buf_sz, dst_buf_sz);