diff --git a/base/include/securectype.h b/base/include/securectype.h index 976328bb902ea193bea6e6efb8db3b553725e7ea..029772c7c98307375125e3257efed5ee7d4479fa 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; \