mirror of https://github.com/acidanthera/audk.git
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:
parent
e38451cd9a
commit
108ff4a04b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue