Skip to content

Commit

Permalink
Address incompatible pointer errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nirosys committed Nov 8, 2024
1 parent 67d9333 commit 26645c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ionc/ion_allocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ iERR _ion_strdup(hOWNER owner, iSTRING dst, iSTRING src)
dst->value = (BYTE *)ion_alloc_with_owner(owner, (is_empty) ? 1 : src->length);
if (!dst->value) FAILWITH(IERR_NO_MEMORY);
}
memcpy(dst->value, (is_empty) ? "\0" : src->value, (is_empty) ? 1 : src->length);
memcpy(dst->value, (is_empty) ? (BYTE*)"\0" : src->value, (is_empty) ? 1 : src->length);

dst->length = src->length;

Expand Down
2 changes: 1 addition & 1 deletion ionc/ion_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ GLOBAL BOOL _debug_on INITTO(TRUE);
(xb) = (*(xh)->_curr++); \
} \
else { \
IONCHECK(ion_stream_read_byte((xh), &(xb))); \
IONCHECK(ion_stream_read_byte((xh), (int *)&(xb))); \
} while(FALSE)

// macro for read_byte
Expand Down

0 comments on commit 26645c1

Please sign in to comment.