]> git.ipfire.org Git - thirdparty/lxc.git/commit
criu: fix error message
authorTycho Andersen <tycho@tycho.pizza>
Thu, 14 Oct 2021 16:40:08 +0000 (10:40 -0600)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 19 Oct 2021 15:13:28 +0000 (17:13 +0200)
commitf3c3987bb2039ae5723a56ed6bd0b7b4f9781ded
tree2d143795b34b18bbca4573f919806f28176f41b8
parent5ac772d63214239fb4903dfa96e601e282f6cb42
criu: fix error message

as of 59d8a539d106 ("criu: massage exec_criu()") I see:

In file included from criu.c:22:
criu.c: In function 'exec_criu':
log.h:376:2: error: '%s' directive argument is null [-Werror=format-overflow=]
  376 |  LXC_ERROR(&locinfo, format, ##__VA_ARGS__);   \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
log.h:457:3: note: in expansion of macro 'ERROR'
  457 |   ERROR("%s - " format, ptr, ##__VA_ARGS__); \
      |   ^~~~~
log.h:491:3: note: in expansion of macro 'SYSERROR'
  491 |   SYSERROR(format, ##__VA_ARGS__);              \
      |   ^~~~~~~~
criu.c:325:11: note: in expansion of macro 'log_error_errno'
  325 |    return log_error_errno(-ENOMEM, ENOMEM, "Failed to remove extraneous slashes from \"%s\"", tmp);
      |           ^~~~~~~~~~~~~~~

it looks like we should be logging the string that failed, vs. tmp here.

(my log was taken from stable-4.0, but the same issue exists on master it
seems.)

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
src/lxc/criu.c