mirror of
https://github.com/SELinuxProject/selinux
synced 2025-03-10 20:27:41 +00:00
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>
This commit is contained in:
parent
c44895c82c
commit
2ec56b3da9
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user