diff options
author | William Roberts <william.c.roberts@intel.com> | 2016-09-28 11:53:57 -0400 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2016-09-28 12:02:25 -0400 |
commit | 2ec56b3da94978fa7ed8a5672f2dc12a3be972f7 (patch) | |
tree | 0345eb0226a92f8e61a7d5e057faa780624314d8 /libselinux/src/label_file.c | |
parent | c44895c82c01829d0773e1fdfa3f8b246bb728ea (diff) | |
download | android_external_selinux-2ec56b3da94978fa7ed8a5672f2dc12a3be972f7.tar.gz android_external_selinux-2ec56b3da94978fa7ed8a5672f2dc12a3be972f7.tar.bz2 android_external_selinux-2ec56b3da94978fa7ed8a5672f2dc12a3be972f7.zip |
libselinux: fix unused variable error
When building for Android, this error manifests itself:
label_file.c:570:7: error: unused variable ‘subs_file’ [-Werror=unused-variable]
char subs_file[PATH_MAX + 1];
Fix it by moving the variable into the ifdef'd usage block.
Signed-off-by: William Roberts <william.c.roberts@intel.com>
Diffstat (limited to 'libselinux/src/label_file.c')
-rw-r--r-- | libselinux/src/label_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c index adf3dccf..a4dc3cdf 100644 --- a/libselinux/src/label_file.c +++ b/libselinux/src/label_file.c @@ -567,7 +567,6 @@ static int init(struct selabel_handle *rec, const struct selinux_opt *opts, struct saved_data *data = (struct saved_data *)rec->data; const char *path = NULL; const char *prefix = NULL; - char subs_file[PATH_MAX + 1]; int status = -1, baseonly = 0; /* Process arguments */ @@ -585,6 +584,7 @@ static int init(struct selabel_handle *rec, const struct selinux_opt *opts, } #if !defined(BUILD_HOST) && !defined(ANDROID) + char subs_file[PATH_MAX + 1]; /* Process local and distribution substitution files */ if (!path) { rec->dist_subs = |