libselinux: Fix unitialized variable compiler warnings

Fix unitialized variable compiler warnings when using the
"-O3 -Werror" flags on gcc6 by initializing the variables in
question. The variables were never used before being initialized.

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:16:54 +01:00 committed by James Carter
parent 055d14a99a
commit 5db4537f64
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ hidden_def(fgetfilecon_raw)
int fgetfilecon(int fd, char ** context)
{
char * rcontext;
char * rcontext = NULL;
int ret;
*context = NULL;

View File

@ -54,7 +54,7 @@ hidden_def(getfilecon_raw)
int getfilecon(const char *path, char ** context)
{
int ret;
char * rcontext;
char * rcontext = NULL;
*context = NULL;

View File

@ -54,7 +54,7 @@ hidden_def(lgetfilecon_raw)
int lgetfilecon(const char *path, char ** context)
{
int ret;
char * rcontext;
char * rcontext = NULL;
*context = NULL;