Whamcloud - gitweb
LU-15220 utils: fix gcc-11 -Werror=format-truncation= error
authorJian Yu <yujian@whamcloud.com>
Fri, 21 Jan 2022 20:37:10 +0000 (12:37 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 24 Jan 2022 05:39:43 +0000 (05:39 +0000)
commitb36a677a7bd0de26fb272be3040f5348a459b02e
treec4fbb845e4769a876a6390cff7cebf4c79fff1c3
parent235a8547097c46111d85a80fe0156fc42c5f911f
LU-15220 utils: fix gcc-11 -Werror=format-truncation= error

This patch fixes the following -Werror=format-truncation= error in
liblustreapi.c:

liblustreapi.c: In function 'lov_dump_comp_v1':
liblustreapi.c:3673:57: error: 'snprintf' output may be truncated
before the last format character [-Werror=format-truncation=]
 3673 |                 snprintf(pool_name, LOV_MAXPOOLNAME, "%s",
      |                                                         ^

Lustre-change: https://review.whamcloud.com/45815
Lustre-commit: 9b0b7264a8d7a6a2abe681d15fefc88c27d20c1e

Change-Id: I55c3e05a933ff3d2c33a71ed269fffe63797b528
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46246
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/utils/liblustreapi.c