On 12/23/2016 10:19 AM, Guido Trentalancia wrote:
Fix compile errors when using the "-O -Werror" flags on gcc6. Signed-off-by: Guido Trentalancia <guido@xxxxxxxxxxxxxxxx>
Applied. I changed the log message to the following: libsemanage: Fix unitialized variable compiler warnings Fix unitialized variable compiler warnings when using the "-O -Werror" flags on gcc6 by initializing the variables in question. It was possible for err_data_len to be used without initialization, but not cil_data_len. Thanks,
--- src/direct_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -pru libsemanage-2.6-orig/src/direct_api.c libsemanage-2.6/src/direct_api.c --- libsemanage-2.6-orig/src/direct_api.c 2016-10-14 17:31:26.000000000 +0200 +++ libsemanage-2.6/src/direct_api.c 2016-12-23 15:22:50.101297993 +0100 @@ -955,8 +955,8 @@ static int semanage_compile_module(seman ssize_t bzip_status; int status = 0; int compressed; - size_t cil_data_len; - size_t err_data_len; + size_t cil_data_len = 0; + size_t err_data_len = 0; if (!strcasecmp(modinfo->lang_ext, "cil")) { goto cleanup; _______________________________________________ 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.
-- James Carter <jwcart2@xxxxxxxxxxxxx> National Security Agency _______________________________________________ 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.