On Thu, 14 Jan 2021 08:07:36 +0100 Miroslav Rezanina <mreza...@redhat.com> wrote:
> Using strncpy with length equal to the size of target array, GCC 11 > reports following warning: > > warning: '__builtin_strncpy' specified bound 256 equals destination size > [-Wstringop-truncation] > > We can prevent this warning by using strpadcpy that copies string > up to specified length, zeroes target array after copied string > and does not raise warning when length is equal to target array > size (and ending '\0' is discarded). > > Signed-off-by: Miroslav Rezanina <mreza...@redhat.com> > --- > target/s390x/kvm.c | 12 +++++------- > target/s390x/misc_helper.c | 7 +++++-- > 2 files changed, 10 insertions(+), 9 deletions(-) Thanks, applied.