mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-24 23:12:05 +00:00
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:
parent
055d14a99a
commit
5db4537f64
@ -53,7 +53,7 @@ hidden_def(fgetfilecon_raw)
|
||||
|
||||
int fgetfilecon(int fd, char ** context)
|
||||
{
|
||||
char * rcontext;
|
||||
char * rcontext = NULL;
|
||||
int ret;
|
||||
|
||||
*context = NULL;
|
||||
|
@ -54,7 +54,7 @@ hidden_def(getfilecon_raw)
|
||||
int getfilecon(const char *path, char ** context)
|
||||
{
|
||||
int ret;
|
||||
char * rcontext;
|
||||
char * rcontext = NULL;
|
||||
|
||||
*context = NULL;
|
||||
|
||||
|
@ -54,7 +54,7 @@ hidden_def(lgetfilecon_raw)
|
||||
int lgetfilecon(const char *path, char ** context)
|
||||
{
|
||||
int ret;
|
||||
char * rcontext;
|
||||
char * rcontext = NULL;
|
||||
|
||||
*context = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user