[lxc/lxc] bdb8ae: criu: fix error message

Skip to first unread message

Stéphane Graber

Oct 14, 2021, 1:02:49 PMOct 14
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: bdb8aeda721f9262695001a7368bb991527b4b8a
Author: Tycho Andersen <ty...@tycho.pizza>
Date: 2021-10-14 (Thu, 14 Oct 2021)

Changed paths:
M src/lxc/criu.c

Log Message:
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

Signed-off-by: Tycho Andersen <ty...@tycho.pizza>

Commit: 1c39a913df870993e61683f49b9c562bf03702b0
Author: Stéphane Graber <stgr...@ubuntu.com>
Date: 2021-10-14 (Thu, 14 Oct 2021)

Changed paths:
M src/lxc/criu.c

Log Message:
Merge pull request #3996 from tych0/fix-criu-log

criu: fix error message

Compare: https://github.com/lxc/lxc/compare/b2668c872f27...1c39a913df87
Reply all
Reply to author
0 new messages