Skip to content

Commit

Permalink
Doing pointer math on void* is a GNU extension.
Browse files Browse the repository at this point in the history
Issue: PLCR-544
  • Loading branch information
sirg3 committed May 19, 2014
1 parent 91b2ae1 commit 95faadd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/PLCrashAsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,12 @@ void *plcrash_async_memset(void *dest, uint8_t value, size_t n) {
* should be necessary
*/
ssize_t plcrash_async_writen (int fd, const void *data, size_t len) {
const void *p;
const uint8_t *p;
size_t left;
ssize_t written = 0;

/* Loop until all bytes are written */
p = data;
p = (const uint8_t *) data;
left = len;
while (left > 0) {
if ((written = write(fd, p, left)) <= 0) {
Expand Down
2 changes: 1 addition & 1 deletion Source/PLCrashAsyncMObject.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void *plcrash_async_mobject_remap_address (plcrash_async_mobject_t *mobj, pl_vm_
if (!plcrash_async_mobject_verify_local_pointer(mobj, (uintptr_t) remapped, offset, length))
return NULL;

return (void *) remapped + offset;
return (void *) (remapped + offset);
}

/**
Expand Down

0 comments on commit 95faadd

Please sign in to comment.