[lxc-devel] [lxc/lxc] 387993: fix compilation error in cgmanager.c

GitHub noreply at github.com
Thu Jan 16 14:30:36 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 387993549317e2be54c030114c0de73f835fa351
      https://github.com/lxc/lxc/commit/387993549317e2be54c030114c0de73f835fa351
  Author: S.Çağlar Onur <caglar at 10ur.org>
  Date:   2014-01-16 (Thu, 16 Jan 2014)

  Changed paths:
    M src/lxc/cgmanager.c

  Log Message:
  -----------
  fix compilation error in cgmanager.c

Currently it fails like following

gcc -DHAVE_CONFIG_H -I. -I../../src   -D_FORTIFY_SOURCE=2 -fPIC -DPIC -I../../src -DLXCROOTFSMOUNT=\"/usr/lib/x86_64-linux-gnu/lxc/rootfs\" -DLXCPATH=\"/var/lib/lxc\" -DLXC_GLOBAL_CONF=\"/etc/lxc/lxc.conf\" -DLXCINITDIR=\"/usr/libexec\" -DLXCTEMPLATEDIR=\"/usr/share/lxc/templates\" -DLOGPATH=\"/var/log/lxc\" -DLXC_DEFAULT_CONFIG=\"/etc/lxc/default.conf\" -DLXC_USERNIC_DB=\"/run/lxc/nics\" -DLXC_USERNIC_CONF=\"/etc/lxc/lxc-usernet\" -DDEFAULT_CGROUP_PATTERN=\"/lxc/%n\" -DHAVE_APPARMOR -DHAVE_CGMANAGER -DHAVE_SELINUX  -DHAVE_SECCOMP  -pthread  -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -Werror -MT liblxc_so-cgmanager.o -MD -MP -MF .deps/liblxc_so-cgmanager.Tpo -c -o liblxc_so-cgmanager.o `test -f 'cgmanager.c' || echo './'`cgmanager.c
In file included from cgmanager.c:48:0:
cgmanager.c: In function ‘cgmanager_remove_cgroup’:
log.h:247:9: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
  struct lxc_log_locinfo locinfo = LXC_LOG_LOCINFO_INIT;  \
   ^
cgmanager.c:142:3: note: in expansion of macro ‘INFO’
   INFO("cgroup removal attempt: %s:%s did not exist");
   ^
log.h:247:9: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
  struct lxc_log_locinfo locinfo = LXC_LOG_LOCINFO_INIT;  \
   ^
cgmanager.c:142:3: note: in expansion of macro ‘INFO’
   INFO("cgroup removal attempt: %s:%s did not exist");
   ^
cc1: all warnings being treated as errors
make[3]: *** [liblxc_so-cgmanager.o] Error 1

Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>




More information about the lxc-devel mailing list