"gcc -O2 -Wall -Werror" failed with two errors when building pp due to the use of unitialized variables. --- policycoreutils/hll/pp/pp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/policycoreutils/hll/pp/pp.c b/policycoreutils/hll/pp/pp.c index 1c476b73c39b..fd80657321bc 100644 --- a/policycoreutils/hll/pp/pp.c +++ b/policycoreutils/hll/pp/pp.c @@ -2604,6 +2604,10 @@ static int file_contexts_to_cil(struct sepol_module_package *mod_pkg) cilmode = "pipe"; } else if (!strcmp(mode, "-l")) { cilmode = "symlink"; + } else { + rc = -1; + log_err("Invalid mode in file context line: %s", line); + goto exit; } cil_printf("(filecon \"%s\" %s ", regex, cilmode); @@ -2930,7 +2934,7 @@ static int get_decl_roles(struct policydb *pdb, struct role_datum ***decl_roles, { int rc = -1; uint32_t num; - struct role_datum **roles; + struct role_datum **roles = NULL; struct decl_roles_args args; args.pdb = pdb; -- 2.1.0 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.