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 1e6b5d7c..57d3a362 100644 --- a/libselinux/Android.bp +++ b/libselinux/Android.bp @@ -8,7 +8,12 @@ common_CFLAGS = [ "-D_GNU_SOURCE", "-DNO_MEDIA_BACKEND", "-DNO_X_BACKEND", - "-DNO_DB_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", ]