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>
This commit is contained in:
Gary Lin 2017-11-22 12:43:56 +08:00 committed by Long Qin
parent e38451cd9a
commit 108ff4a04b
1 changed files with 2 additions and 2 deletions

View File

@ -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;