]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tools: hv: Fix a complier warning in the fcopy uio daemon
authorDexuan Cui <decui@microsoft.com>
Tue, 10 Sep 2024 00:44:32 +0000 (00:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Dec 2024 13:02:15 +0000 (14:02 +0100)
commit9015ebfe8ec5397ea8f73ce3614df60957c572d0
tree5325fc7bb669386429c571b035215d915601b192
parent3dd7a30c6d7f90afcf19e9b072f572ba524d7ec6
tools: hv: Fix a complier warning in the fcopy uio daemon

commit cb1b78f1c726c938bd47497c1ab16b01ce967f37 upstream.

hv_fcopy_uio_daemon.c:436:53: warning: '%s' directive output may be truncated
writing up to 14 bytes into a region of size 10 [-Wformat-truncation=]
  436 |  snprintf(uio_dev_path, sizeof(uio_dev_path), "/dev/%s", uio_name);

Also added 'static' for the array 'desc[]'.

Fixes: 82b0945ce2c2 ("tools: hv: Add new fcopy application based on uio driver")
Cc: stable@vger.kernel.org # 6.10+
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Link: https://lore.kernel.org/r/20240910004433.50254-1-decui@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20240910004433.50254-1-decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_fcopy_uio_daemon.c