From 855084960feb9e593a3bca288ab328a34a99ac57 Mon Sep 17 00:00:00 2001
From: Nick Kralevich <nnk@google.com>
Date: Tue, 14 Aug 2018 14:40:24 -0700
Subject: [PATCH] Fix m4 warnings

Quotes and backticks are sensitive characters and should never show up
in a comment. Fix comment to avoid the use of a single quote. Also fixes
a bug where certain rules were not getting included in the compiled
policy.

Fixes the following build warnings:

[  3% 3564/114975] build out/target/product/taimen/obj/ETC/sepolicy_neverallows_intermediates/plat_pub_policy.conf
m4:system/sepolicy/public/te_macros:404: Warning: excess arguments to builtin `define' ignored
[  3% 3578/114975] build out/target/product/taimen/obj/ETC/plat_sepolicy.cil_intermediates/plat_policy.conf
m4:system/sepolicy/public/te_macros:404: Warning: excess arguments to builtin `define' ignored
[  3% 3579/114975] build out/target/product/taimen/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_policy.conf
m4:system/sepolicy/public/te_macros:404: Warning: excess arguments to builtin `define' ignored
[  3% 3607/114975] build out/target/product/taimen/obj/ETC/sepolicy_neverallows_intermediates/policy.conf
m4:system/sepolicy/public/te_macros:404: Warning: excess arguments to builtin `define' ignored
[  3% 3677/114975] build out/target/product/taimen/obj/ETC/built_plat_sepolicy_intermediates/base_plat_policy.conf
m4:system/sepolicy/public/te_macros:404: Warning: excess arguments to builtin `define' ignored

Test: policy compiles and no warnings.
Change-Id: Ie32d8b536955b40888b79e3a93851d2ae297f8ee
---
 public/te_macros | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public/te_macros b/public/te_macros
index 67df3071f..a03bfe9bf 100644
--- a/public/te_macros
+++ b/public/te_macros
@@ -408,7 +408,7 @@ allow $1 sysfs_wake_lock:file rw_file_perms;
 allow $1 self:global_capability2_class_set block_suspend;
 # TODO(b/36375663): wake lock clients should be tagged with
 # hal_system_suspend_client and halclientdomain attributes. However,
-# typeattribute statements don't allow applying attributes to other attributes,
+# typeattribute statements do not allow applying attributes to other attributes,
 # so instead we grant appropriate permissions directly within this macro.
 # hal_system_suspend_client permissions
 binder_call($1, hal_system_suspend_server)
-- 
GitLab