Found by grepping for pointer casts.
Change-Id: If73184a16904ec2958e7253ba98f44479fdcad3f
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1772
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
row_size = 512;
}
- retval = target_write_buffer(target, write_algorithm->address,
- sizeof(pic32mx_flash_write_code), (uint8_t *)pic32mx_flash_write_code);
+ uint8_t code[sizeof(pic32mx_flash_write_code)];
+ target_buffer_set_u32_array(target, code, ARRAY_SIZE(pic32mx_flash_write_code),
+ pic32mx_flash_write_code);
+ retval = target_write_buffer(target, write_algorithm->address, sizeof(code), code);
if (retval != ERROR_OK)
return retval;