The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/363
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) === Both are standard in LXC for a long time now. And gcc-4.8 which is the minimal compiler version we require (same as the Linux kernel) deals with this. Closes #3287. Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 28572e1057df67d08073d8dfdde8f18d526b7344 Mon Sep 17 00:00:00 2001 From: Christian Brauner <christian.brau...@ubuntu.com> Date: Wed, 11 Mar 2020 03:10:09 +0100 Subject: [PATCH] configure: add -Wvla and -std=gnu11 Both are standard in LXC for a long time now. And gcc-4.8 which is the minimal compiler version we require (same as the Linux kernel) deals with this. Closes #3287. Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com> --- configure.ac | 2 +- src/proc_cpuview.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 21ae513..4092883 100644 --- a/configure.ac +++ b/configure.ac @@ -248,8 +248,8 @@ AX_CHECK_COMPILE_FLAG([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"],,[ AX_CHECK_COMPILE_FLAG([-fasynchronous-unwind-tables], [CFLAGS="$CFLAGS -fasynchronous-unwind-tables"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-pipe], [CFLAGS="$CFLAGS -pipe"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-fexceptions], [CFLAGS="$CFLAGS -fexceptions"],,[-Werror]) -CFLAGS="$CFLAGS -fvisibility=hidden" +CFLAGS="$CFLAGS -fvisibility=hidden -Wvla -std=gnu11" AX_CHECK_LINK_FLAG([-z relro], [LDFLAGS="$LDFLAGS -z relro"],,[]) AX_CHECK_LINK_FLAG([-z now], [LDFLAGS="$LDFLAGS -z now"],,[]) diff --git a/src/proc_cpuview.c b/src/proc_cpuview.c index 4d8ead5..15a7b5c 100644 --- a/src/proc_cpuview.c +++ b/src/proc_cpuview.c @@ -433,7 +433,7 @@ static bool read_cpu_cfs_param(const char *cg, const char *param, int64_t *value if (!cgroup_ops->get(cgroup_ops, "cpu", cg, file, &str)) return false; - if (sscanf(str, first ? "%"PRId64 : "%*"PRId64" %"PRId64, value) != 1) + if (sscanf(str, first ? "%" PRId64 : "%*" PRId64 " %" PRId64, value) != 1) return false; return true;
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel