]> code.ossystems Code Review - openembedded-core.git/commit
mdadm: fix gcc-8 format-truncation warning
authorHongxu Jia <hongxu.jia@windriver.com>
Fri, 14 Dec 2018 07:29:56 +0000 (15:29 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Jan 2019 10:38:21 +0000 (10:38 +0000)
commitcd5013a94609ef2f3e0d621339e22e4137d649d3
tree3eae8466c929ab73b9cedb9a41d655e16ec62f26
parent04656f5df326a72747fc5878ce201b636a2a419c
mdadm: fix gcc-8 format-truncation warning

While compiling with `-Werror=format-truncation=', it failed
[snip]
|super0.c:236:32: error: 'snprintf' output may be truncated
before the last format character [-Werror=format-truncation=]
|   snprintf(nb, sizeof(nb), "%4d", d);
|                                ^
|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
into a destination of size 11
|   snprintf(nb, sizeof(nb), "%4d", d);
[snip]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch [new file with mode: 0644]
meta/recipes-extended/mdadm/mdadm_4.1.bb