From 804bd8e5a242ed9b4ed0f9bf8d48a3e48d0d3fd3 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 1 Sep 2022 20:11:36 +0800 Subject: [PATCH] change memcpy to (void)memcpy Signed-off-by: sam --- base/include/securectype.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/include/securectype.h b/base/include/securectype.h index 976328b..029772c 100644 --- a/base/include/securectype.h +++ b/base/include/securectype.h @@ -71,7 +71,7 @@ #include #endif -/* add the -DSECUREC_SUPPORT_FORMAT_WARNING compiler option to supoort -Wformat. +/* add the -DSECUREC_SUPPORT_FORMAT_WARNING compiler option to support -Wformat. * default does not check the format is that the same data type in the actual code * in the product is different in the original data type definition of VxWorks and Linux. */ @@ -207,7 +207,7 @@ long __builtin_expect(long exp, long c); if (catRestSize == 0) { \ catRet = EINVAL; \ } else if ((strlen(src) + 1) <= catRestSize) { \ - memcpy(catTmpDst, (src), strlen(src) + 1); \ + (void)memcpy(catTmpDst, (src), strlen(src) + 1); \ catRet = EOK; \ } else { \ catRet = ERANGE; \ @@ -242,10 +242,10 @@ long __builtin_expect(long exp, long c); ncatRet = EINVAL; \ } else if ((SECUREC_TWO_MIN((count) , strlen(src)) + 1) <= ncatRestSize ) { \ if ((count) < strlen(src)) { \ - memcpy(ncatTmpDest, (src), (count)); \ + (void)memcpy(ncatTmpDest, (src), (count)); \ *(ncatTmpDest + (count)) = '\0'; \ } else { \ - memcpy(ncatTmpDest, (src), strlen(src) + 1); \ + (void)memcpy(ncatTmpDest, (src), strlen(src) + 1); \ } \ } else { \ ncatRet = ERANGE; \ -- Gitee