summaryrefslogtreecommitdiffstats
path: root/CryptoPkg
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-11-22 12:43:56 +0800
committerLong Qin <qin.long@intel.com>2017-11-24 16:36:29 +0800
commit108ff4a04b051eea61fa5440bb1101b309ac8713 (patch)
tree04f4c63582c357a4feb35c6fcf0df59666060c35 /CryptoPkg
parente38451cd9a87f86d9c699281252d381e10dcc98e (diff)
downloadedk2-108ff4a04b051eea61fa5440bb1101b309ac8713.tar.gz
edk2-108ff4a04b051eea61fa5440bb1101b309ac8713.tar.bz2
edk2-108ff4a04b051eea61fa5440bb1101b309ac8713.zip
CryptoPkg/IntrinsicLib: Fix the warning on memset
Gcc issued the warning when compiling CryptoPkg: CryptoPkg/Library/Include/CrtLibSupport.h:135:17: warning: type of 'memset' does not match original declaration [-Wlto-type-mismatch] void *memset (void *, int, size_t); ^ CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c:27:8: note: type mismatch in parameter 2 void * memset (void *dest, char ch, size_t count) ^ This commit changes the type of ch from char to int to match the declaration. Cc: Qin Long <qin.long@intel.com> Cc: Ting Ye <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Qin Long <qin.long@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r--CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
index bf485d680d..e095f9aa0d 100644
--- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
+++ b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c
@@ -24,7 +24,7 @@ typedef UINTN size_t;
int _fltused = 1;
/* Sets buffers to a specified character */
-void * memset (void *dest, char ch, size_t count)
+void * memset (void *dest, int ch, size_t count)
{
//
// NOTE: Here we use one base implementation for memset, instead of the direct
@@ -42,7 +42,7 @@ void * memset (void *dest, char ch, size_t count)
Pointer = (UINT8 *)dest;
while (count-- != 0) {
- *(Pointer++) = ch;
+ *(Pointer++) = (UINT8)ch;
}
return dest;