From f9f431cd28ed6a78a2659758ce4a83c4c76fc3a1 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Fri, 18 Jul 2014 18:32:13 -0400 Subject: [PATCH] Use (void) memcpy(), not (void *) memcpy() This was caught by Clang. Clearly the intent of this code was to explicitly ignore the return value. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #3054 --- lib/libefi/rdwr_efi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c index 147e30a374..24ec365b5a 100644 --- a/lib/libefi/rdwr_efi.c +++ b/lib/libefi/rdwr_efi.c @@ -861,11 +861,11 @@ write_pmbr(int fd, struct dk_gpt *vtoc) /* LINTED -- always longlong aligned */ dk_ioc.dki_data = (efi_gpt_t *)buf; if (efi_ioctl(fd, DKIOCGETEFI, &dk_ioc) == -1) { - (void *) memcpy(&mb, buf, sizeof (mb)); + (void) memcpy(&mb, buf, sizeof (mb)); bzero(&mb, sizeof (mb)); mb.signature = LE_16(MBB_MAGIC); } else { - (void *) memcpy(&mb, buf, sizeof (mb)); + (void) memcpy(&mb, buf, sizeof (mb)); if (mb.signature != LE_16(MBB_MAGIC)) { bzero(&mb, sizeof (mb)); mb.signature = LE_16(MBB_MAGIC); @@ -905,7 +905,7 @@ write_pmbr(int fd, struct dk_gpt *vtoc) *cp++ = 0xff; } - (void *) memcpy(buf, &mb, sizeof (mb)); + (void) memcpy(buf, &mb, sizeof (mb)); /* LINTED -- always longlong aligned */ dk_ioc.dki_data = (efi_gpt_t *)buf; dk_ioc.dki_lba = 0;