portability: Warn at void* arithmetics which is a GNU C extension

Ensure future commits do not re-introduce use of this GNU C extension.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
This commit is contained in:
Mark Ruvald Pedersen 2018-09-14 14:24:53 +02:00 committed by Anas Nashif
parent d67096da05
commit 28394cc44e

View file

@ -264,6 +264,9 @@ zephyr_system_include_directories(${NOSTDINC})
# Force an error when things like SYS_INIT(foo, ...) occur with a missing header.
zephyr_cc_option(-Werror=implicit-int)
# Prohibit void pointer arithmetic. Illegal in C99
zephyr_cc_option(-Wpointer-arith)
# Prohibit date/time macros, which would make the build non-deterministic
# cc-option(-Werror=date-time)