Whamcloud - gitweb
LU-15220 utils: fix gcc-11 -Werror=format-truncation= error 15/45815/2
authorJian Yu <yujian@whamcloud.com>
Thu, 9 Dec 2021 20:00:36 +0000 (12:00 -0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Dec 2021 07:21:13 +0000 (07:21 +0000)
commit9b0b7264a8d7a6a2abe681d15fefc88c27d20c1e
tree7cf6a58641bc9a09a1ddeecc42f5deb7f4e861b0
parent63b5812e4e3b50898769c5badf533557293ffe2c
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",
      |                                                         ^

Change-Id: I55c3e05a933ff3d2c33a71ed269fffe63797b528
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45815
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/liblustreapi.c