Don't allow int<->pointer conversions.

Normally we don't have -Werror for upstream code, but for those warnings
that probably point to 32-bit assumptions about pointers, we want those
warnings to always be errors.

Change-Id: Ibece9caf09b2f7989ca600ef448d07868669a8fb
This commit is contained in:
Elliott Hughes 2013-10-08 17:04:33 -07:00
parent 458076c3c7
commit 2ec400bfc7

View File

@ -562,7 +562,13 @@ libc_common_cflags := \
-DINET6 \
-I$(LOCAL_PATH)/private \
-DPOSIX_MISTAKE \
-Wall -Wextra
-Wall -Wextra \
# Try to catch typical 32-bit assumptions that break with 64-bit pointers.
libc_common_cflags += \
-Werror=pointer-to-int-cast \
-Werror=int-to-pointer-cast \
-Werror=type-limits \
ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
libc_common_cflags += -DDEBUG