mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libcontainer: nsenter: nsexec.c: fix warnings
Fix the following warnings when building runc with gcc 6+:
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:
In function ‘nsexec’:
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:322:6:
warning: ‘__s’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
pr_perror("Failed to open %s", ns);
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:273:30:
note: ‘__s’ was declared here
static struct nsenter_config process_nl_attributes(int pipenum, char
*data, int data_size)
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
@@ -302,7 +302,7 @@ static struct nsenter_config process_nl_attributes(int pipenum, char *data, int
|
||||
int fds[nslen];
|
||||
char *nslist[nslen];
|
||||
char *ns;
|
||||
char *saveptr;
|
||||
char *saveptr = NULL;
|
||||
|
||||
for (i = 0; i < nslen; i++) {
|
||||
char *str = NULL;
|
||||
|
||||
Reference in New Issue
Block a user