target/register: use an array of uint8_t for register's value
The use of 'void *' makes the pointer arithmetic incompatible with standard C, even if this is allowed by GCC extensions. The use of 'void *' can also hide incorrect pointer assignments. Switch to 'uint8_t *' and add GCC warning flag to track any use of pointer arithmetic extension. Change-Id: Ic4d15a232834cd6b374330f70e2473a359b1607f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5937 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
@@ -833,6 +833,7 @@ AS_IF([test "x${gcc_wextra}" = "xyes"], [
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wcast-align"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wredundant-decls"
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Wpointer-arith"
|
||||
])
|
||||
AS_IF([test "x${gcc_werror}" = "xyes"], [
|
||||
GCC_WARNINGS="${GCC_WARNINGS} -Werror"
|
||||
|
||||
Reference in New Issue
Block a user