The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2889

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Builds on PR from @brauner https://github.com/lxc/lxc/pull/2886

I'm still working through these, but thought I would open in draft form early.


From c1b07e059f9951dd5183dc93f8dfc0051c2cb189 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Fri, 1 Mar 2019 21:15:20 +0100
Subject: [PATCH 1/5] conf: remove unused variable

Closes #2885.

Signed-off-by: Christian Brauner <[email protected]>
---
 src/lxc/conf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index c0ac73be2a..a2a35c768e 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -2813,7 +2813,6 @@ static int idmaptool_on_path_and_privileged(const char 
*binary, cap_value_t cap)
        __do_free char *path = NULL;
        int ret;
        struct stat st;
-       int fret = 0;
 
        errno = EINVAL;
        if (cap != CAP_SETUID && cap != CAP_SETGID)

From 0cacddda88fad144264d82c3ab05e478cd2d72e9 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Fri, 1 Mar 2019 21:15:49 +0100
Subject: [PATCH 2/5] confile: shut up gcc

Invalid warning but let's please the compiler.

Closes #2885.

Signed-off-by: Christian Brauner <[email protected]>
---
 src/lxc/confile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index cecb65548e..120e9cddf8 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -2711,7 +2711,7 @@ int write_config(int fd, const struct lxc_conf *conf)
 bool do_append_unexp_config_line(struct lxc_conf *conf, const char *key,
                                 const char *v)
 {
-       __do_free char *tmp;
+       __do_free char *tmp = NULL;
        int ret;
        size_t len;
 

From 03ce02341387dd31257aaae89cea44ea7eb6c4e5 Mon Sep 17 00:00:00 2001
From: tomponline <[email protected]>
Date: Sat, 2 Mar 2019 10:11:51 +0000
Subject: [PATCH 3/5] attach: remove unused variable

Closes lxc#2885.

Signed-off-by: tomponline <[email protected]>
---
 src/lxc/attach.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lxc/attach.c b/src/lxc/attach.c
index 288458230f..f4e43e2b62 100644
--- a/src/lxc/attach.c
+++ b/src/lxc/attach.c
@@ -159,7 +159,6 @@ static int in_same_namespace(pid_t pid1, pid_t pid2, const 
char *ns)
 {
        __do_close_prot_errno int ns_fd1 = -1, ns_fd2 = -1;
        int ret = -1;
-       int saved_errno;
        struct stat ns_st1, ns_st2;
 
        ns_fd1 = lxc_preserve_ns(pid1, ns);

From 42af46d03ff8c9edbc14806dce64f89a74333f75 Mon Sep 17 00:00:00 2001
From: tomponline <[email protected]>
Date: Sat, 2 Mar 2019 10:14:32 +0000
Subject: [PATCH 4/5] attacg: shut up gcc

Invalid warning but let's please the compiler.

Closes lxc#2885.

Signed-off-by: tomponline <[email protected]>
---
 src/lxc/attach.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/attach.c b/src/lxc/attach.c
index f4e43e2b62..d3ab984228 100644
--- a/src/lxc/attach.c
+++ b/src/lxc/attach.c
@@ -669,7 +669,7 @@ static bool no_new_privs(struct lxc_container *c, 
lxc_attach_options_t *options)
 
 static signed long get_personality(const char *name, const char *lxcpath)
 {
-       __do_free char *p;
+       __do_free char *p = NULL;
 
        p = lxc_cmd_get_config_item(name, "lxc.arch", lxcpath);
        if (!p)

From 93e93369ad4b8230086a1ee85bb44465050d1a51 Mon Sep 17 00:00:00 2001
From: tomponline <[email protected]>
Date: Sat, 2 Mar 2019 10:18:18 +0000
Subject: [PATCH 5/5] cgroups: remove unused variables

Signed-off-by: tomponline <[email protected]>
---
 src/lxc/cgroups/cgfsng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 76d4dfe6d1..96e0af62c9 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -386,7 +386,7 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool 
am_initialized)
        int ret;
        ssize_t i;
        char oldv;
-       char *lastslash, *posscpus_tmp;
+       char *lastslash;
        ssize_t maxisol = 0, maxposs = 0;
        bool bret = false, flipped_bit = false;
 
@@ -2642,7 +2642,7 @@ static int cg_unified_init(struct cgroup_ops *ops, bool 
relative,
 {
        __do_free char *subtree_path = NULL;
        int ret;
-       char *mountpoint, *tmp;
+       char *mountpoint;
        char **delegatable;
        struct hierarchy *new;
        char *base_cgroup = NULL;
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to