The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3349
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) === GCC 7 appears to be clever enough to detect that transient_len is uninitialised but not that it won't be used despite [1]. Just initialise it to zero to stop the complaining, and allow LXC to build on openSUSE Leap. [1]: 346830421a96 ("cgroups: fix "uninitialized transient_len" warning") Signed-off-by: Aleksa Sarai <cyp...@cyphar.com>
From fdb0b8ab2d83eace642153626a5dd5ef04d6f749 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai <cyp...@cyphar.com> Date: Fri, 3 Apr 2020 02:13:11 +1100 Subject: [PATCH] cgroups: fix build warning on GCC 7 GCC 7 appears to be clever enough to detect that transient_len is uninitialised but not that it won't be used despite [1]. Just initialise it to zero to stop the complaining, and allow LXC to build on openSUSE Leap. [1]: 346830421a96 ("cgroups: fix "uninitialized transient_len" warning") Signed-off-by: Aleksa Sarai <cyp...@cyphar.com> --- src/lxc/cgroups/cgfsng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 21c2c3f7ce..d3595bcdf9 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1360,7 +1360,7 @@ __cgfsng_ops static inline bool cgfsng_payload_create(struct cgroup_ops *ops, __cgfsng_ops static bool cgfsng_monitor_enter(struct cgroup_ops *ops, struct lxc_handler *handler) { - int monitor_len, transient_len; + int monitor_len, transient_len = 0; char monitor[INTTYPE_TO_STRLEN(pid_t)], transient[INTTYPE_TO_STRLEN(pid_t)];
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel