Merge "libselinux: fix build warning" am: 31a6155a15 am: f9279b9fca
am: 67dc0e32d7
Change-Id: Ie0faa6b5ebb46664e4e39e4a8dc2a6b9161baefd
diff --git a/libselinux/src/android/android_platform.c b/libselinux/src/android/android_platform.c
index 2dfbc93..539f317 100644
--- a/libselinux/src/android/android_platform.c
+++ b/libselinux/src/android/android_platform.c
@@ -149,11 +149,6 @@
return sehandle;
}
-static bool selinux_android_opts_file_exists(const struct selinux_opt *opt)
-{
- return (access(opt[0].value, R_OK) != -1);
-}
-
struct selabel_handle* selinux_android_file_context_handle(void)
{
struct selinux_opt seopts_file[MAX_FILE_CONTEXT_SIZE];
@@ -449,7 +444,7 @@
struct seapp_context *cur;
char *p, *name = NULL, *value = NULL, *saveptr;
size_t i, len, files_len = 0;
- int n, ret;
+ int ret;
const char* seapp_contexts_files[MAX_FILE_CONTEXT_SIZE];
for (i = 0; i < ARRAY_SIZE(seapp_contexts_plat); i++) {
if (access(seapp_contexts_plat[i], R_OK) != -1) {
@@ -854,7 +849,6 @@
const char *username = NULL;
struct seapp_context *cur = NULL;
int i;
- size_t n;
uid_t userid;
uid_t appid;
bool isPrivApp = false;
diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
index b3b36bc..3a9fb3b 100644
--- a/libselinux/src/label_file.c
+++ b/libselinux/src/label_file.c
@@ -598,6 +598,7 @@
return NULL;
}
+#if !defined(BUILD_HOST) && !defined(ANDROID)
static int selabel_subs_init(const char *path, struct selabel_digest *digest,
struct selabel_sub **out_subs)
{
@@ -681,6 +682,7 @@
}
goto out;
}
+#endif
static char *selabel_sub_key(struct saved_data *data, const char *key)
{