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]: 34683042 ("cgroups: fix "uninitialized transient_len" warning") Signed-off-by: 's avatarAleksa Sarai <cyphar@cyphar.com>
parent 9f6302e3
...@@ -1360,7 +1360,7 @@ __cgfsng_ops static inline bool cgfsng_payload_create(struct cgroup_ops *ops, ...@@ -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, __cgfsng_ops static bool cgfsng_monitor_enter(struct cgroup_ops *ops,
struct lxc_handler *handler) struct lxc_handler *handler)
{ {
int monitor_len, transient_len; int monitor_len, transient_len = 0;
char monitor[INTTYPE_TO_STRLEN(pid_t)], char monitor[INTTYPE_TO_STRLEN(pid_t)],
transient[INTTYPE_TO_STRLEN(pid_t)]; transient[INTTYPE_TO_STRLEN(pid_t)];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment