diff options
author | Alexandre Pereira da Silva <aletes.xgr@gmail.com> | 2012-02-24 18:51:48 -0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2012-03-14 22:23:43 +0000 |
commit | 7151398cff16129764c79038a2701322f62da883 (patch) | |
tree | 7f18efbbc4c11b248510e7bce416df0d6db9aa36 /src/jtag/stlink | |
parent | 4a29a4a86d4ec3e12a9494371c80ace1b8ebedab (diff) |
stlink: fix alignment build warning
The {read,write}_mem32 interface functions was asking a 32 bits buffer
but they don't need 32 bits alignment.
This will change the interface to a 8 bits buffer to remove the
alignment mismatch warning. This was causing build errors on platforms
with strict aliasing rules.
Change-Id: I338be8df5686f07a64ddb4f17c1bb494af583999
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Reviewed-on: http://openocd.zylin.com/483
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/jtag/stlink')
-rw-r--r-- | src/jtag/stlink/stlink_layout.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/stlink/stlink_layout.h b/src/jtag/stlink/stlink_layout.h index c0c89f57..59e6174c 100644 --- a/src/jtag/stlink/stlink_layout.h +++ b/src/jtag/stlink/stlink_layout.h @@ -56,10 +56,10 @@ struct stlink_layout_api_s { const uint8_t *buffer); /** */ int (*read_mem32) (void *handle, uint32_t addr, uint16_t len, - uint32_t *buffer); + uint8_t *buffer); /** */ int (*write_mem32) (void *handle, uint32_t addr, uint16_t len, - const uint32_t *buffer); + const uint8_t *buffer); /** */ int (*idcode) (void *fd, uint32_t *idcode); /** */ |