From aa48511973613c67c85e84bf2eb6cd9bd1b2f69a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 03:41:36 +0000 Subject: [PATCH] Merge r7408 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7665 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index b9fb055b2..964a98e51 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -4138,7 +4138,10 @@ static int vdisk_usn_vpd(uint8_t *buf, struct scst_cmd *cmd, read_lock(&vdisk_serial_rwlock); usn_len = strlen(virt_dev->usn); buf[3] = usn_len; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-truncation" strncpy(&buf[4], virt_dev->usn, usn_len); +#pragma GCC diagnostic pop read_unlock(&vdisk_serial_rwlock); } return buf[3] + 4;