From c037b2e2ab3e042d9e3079f6c6e44de15a6e5742 Mon Sep 17 00:00:00 2001 From: Huyuanyuan <953653704@qq.com> Date: Tue, 30 Aug 2022 18:53:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?securectype.h#L210=20=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=98=BE=E5=BC=8F(void)=E5=BF=BD=E7=95=A5=E6=8E=89=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Huyuanyuan <953653704@qq.com> --- base/include/securectype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/include/securectype.h b/base/include/securectype.h index 976328b..b5a3374 100644 --- a/base/include/securectype.h +++ b/base/include/securectype.h @@ -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; \ -- Gitee From 5b43f800b681f7d0d725da3acd56e5857d41595b Mon Sep 17 00:00:00 2001 From: Huyuanyuan <953653704@qq.com> Date: Wed, 31 Aug 2022 14:05:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Line=20245=E3=80=81248=20(void)=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E6=8E=89=E5=87=BD=E6=95=B0=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Huyuanyuan <953653704@qq.com> --- base/include/securectype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/include/securectype.h b/base/include/securectype.h index b5a3374..214081b 100644 --- a/base/include/securectype.h +++ b/base/include/securectype.h @@ -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