aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuchao <liuchao741@huawei.com>2018-01-11 17:06:47 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-01-11 17:06:47 +0000
commit67dc0e32d7b899396851bfdb149b803a4275ce26 (patch)
tree632f432f9347b03f3fe0b33e778f72cbc40f1037
parent7c98980c7c838d8d99ff3ad64fd641b367060dad (diff)
parentf9279b9fca9bda95ce50a24c7462c3441bb18a33 (diff)
downloadselinux-67dc0e32d7b899396851bfdb149b803a4275ce26.tar.gz
Merge "libselinux: fix build warning" am: 31a6155a15
am: f9279b9fca Change-Id: I7de9f2866e00ba0c7c9bb610f00bdef599449c08
-rw-r--r--libselinux/src/android/android_platform.c8
-rw-r--r--libselinux/src/label_file.c2
2 files changed, 3 insertions, 7 deletions
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)
{