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 <guido@trentalancia.net>
Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
This commit is contained in:
Guido Trentalancia 2016-12-23 16:19:46 +01:00 committed by James Carter
parent 5db4537f64
commit 0abc25a3e6
1 changed files with 2 additions and 2 deletions

View File

@ -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;