diff --git a/checkpolicy/Android.bp b/checkpolicy/Android.bp index 1ca0e072..bfd91b7c 100644 --- a/checkpolicy/Android.bp +++ b/checkpolicy/Android.bp @@ -21,6 +21,7 @@ cc_binary_host { cc_binary_host { name: "dispol", + cflags: common_CFLAGS, srcs: ["test/dispol.c"], static_libs: ["libsepol"], } diff --git a/libselinux/Android.bp b/libselinux/Android.bp index b2eba434..220e953e 100644 --- a/libselinux/Android.bp +++ b/libselinux/Android.bp @@ -9,6 +9,11 @@ common_CFLAGS = [ "-DNO_MEDIA_BACKEND", "-DNO_X_BACKEND", "-DNO_DB_BACKEND", + "-Wall", + "-Werror", + "-Wno-error=missing-noreturn", + "-Wno-error=unused-function", + "-Wno-error=unused-variable", ] cc_defaults { diff --git a/libsepol/Android.bp b/libsepol/Android.bp index 49398b4a..71935a90 100644 --- a/libsepol/Android.bp +++ b/libsepol/Android.bp @@ -1,10 +1,11 @@ common_CFLAGS = [ "-D_GNU_SOURCE", "-Wall", + "-Werror", "-W", "-Wundef", "-Wshadow", - "-Wmissing-noreturn", + "-Wno-error=missing-noreturn", "-Wmissing-format-attribute", ]