1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/daemons/lvmlockd
Leo Yan 5e17203ff5 lvmlockd: Fix the compilation warning
As SUSE build tool reports the warning:

lvmlockd-core.c: In function 'client_thread_main':
lvmlockd-core.c:4959:37: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Wformat-truncation=]
    snprintf(buf, sizeof(buf), "path[%d]", i);
                                     ^~
lvmlockd-core.c:4959:31: note: directive argument in the range [0, 2147483647]
    snprintf(buf, sizeof(buf), "path[%d]", i);
                               ^~~~~~~~~~

To dismiss the compilation warning, enlarge the array "buf" to 17
bytes to support the max signed integer: string format 6 bytes + signed
integer 10 bytes + terminal char "\0".

Reported-by: Heming Zhao <heming.zhao@suse.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
2021-06-08 09:33:26 -05:00
..
.gitignore gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
lvmlockctl.c cov: avoid leak when repeating options 2021-04-23 22:59:25 +02:00
lvmlockd-client.h cleanup: matching declaration order 2020-09-01 17:57:50 +02:00
lvmlockd-core.c lvmlockd: Fix the compilation warning 2021-06-08 09:33:26 -05:00
lvmlockd-dlm.c cleanup: free already checks for NULL 2021-03-02 22:57:35 +01:00
lvmlockd-idm.c lvmlockd: idm: Introduce new locking scheme 2021-05-20 16:00:59 -05:00
lvmlockd-internal.h lvmlockd: idm: Hook Seagate IDM wrapper APIs 2021-05-20 16:01:04 -05:00
lvmlockd-sanlock.c cleanup: free already checks for NULL 2021-03-02 22:57:35 +01:00
Makefile.in lvmlockd: idm: Introduce new locking scheme 2021-05-20 16:00:59 -05:00