diff options
author | Pete Batard <pete@akeo.ie> | 2018-04-24 13:45:11 +0100 |
---|---|---|
committer | Nigel Croxon <ncroxon@redhat.com> | 2018-05-01 08:00:48 -0400 |
commit | 85f1c797f6935223205159dd108e4871b2e55500 (patch) | |
tree | f7e5ac04b079af6f85834fa9c199d4486c1b6dce /lib | |
parent | fc5af9e47fb63fbadf6acd218abc60352ce41e31 (diff) | |
download | gnu-efi-85f1c797f6935223205159dd108e4871b2e55500.tar.gz |
Fix conversion from 'UINTN' to 'UINT8' warnings
* MSVC generates two of the following in rtstr.c:
warning C4244: 'function': conversion from 'UINTN' to 'UINT8', possible loss of data
Diffstat (limited to 'lib')
-rw-r--r-- | lib/runtime/rtstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/runtime/rtstr.c b/lib/runtime/rtstr.c index 80ff489..dcc1a2a 100644 --- a/lib/runtime/rtstr.c +++ b/lib/runtime/rtstr.c @@ -71,7 +71,7 @@ RtStrnCpy ( { UINTN Size = RtStrnLen(Src, Len); if (Size != Len) - RtSetMem(Dest + Len, '\0', (Len - Size) * sizeof(CHAR16)); + RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16))); RtCopyMem(Dest, Src, Size * sizeof(CHAR16)); } @@ -107,7 +107,7 @@ RtStpnCpy ( { UINTN Size = RtStrnLen(Src, Len); if (Size != Len) - RtSetMem(Dest + Len, '\0', (Len - Size) * sizeof(CHAR16)); + RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16))); RtCopyMem(Dest, Src, Size * sizeof(CHAR16)); return Dest + Size; } |