From 0abc25a3e60f26cc8371a2b2909fe4801924a304 Mon Sep 17 00:00:00 2001 From: Guido Trentalancia Date: Fri, 23 Dec 2016 16:19:46 +0100 Subject: [PATCH] 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. Signed-off-by: Guido Trentalancia Signed-off-by: James Carter --- libsemanage/src/direct_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c index e5c72cd0..742c54f0 100644 --- a/libsemanage/src/direct_api.c +++ b/libsemanage/src/direct_api.c @@ -955,8 +955,8 @@ static int semanage_compile_module(semanage_handle_t *sh, 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;