diff --git a/libselinux/src/android/android_platform.c b/libselinux/src/android/android_platform.c index 2dfbc938..539f317c 100644 --- a/libselinux/src/android/android_platform.c +++ b/libselinux/src/android/android_platform.c @@ -149,11 +149,6 @@ static struct selabel_handle* selinux_android_file_context(const struct selinux_ 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 @@ int selinux_android_seapp_context_reload(void) 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 @@ static int seapp_context_lookup(enum seapp_kind kind, 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 b3b36bc2..3a9fb3b1 100644 --- a/libselinux/src/label_file.c +++ b/libselinux/src/label_file.c @@ -598,6 +598,7 @@ static char *selabel_sub(struct selabel_sub *ptr, const char *src) 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 @@ err: } goto out; } +#endif static char *selabel_sub_key(struct saved_data *data, const char *key) {