Fix CLANG compilation warnings

This commit is contained in:
Nikolaj Schlej 2014-11-10 18:49:12 +01:00
parent fa9acb775e
commit 7f3e22302c

View File

@ -260,7 +260,7 @@ STATIC NODE mPos, mMatchPos, mAvail, *mPosition, *mParent, *mPrev, *mNext = NU
EFI_STATUS EFI_STATUS
EfiCompress ( EfiCompress (
IN VOID *SrcBuffer, IN CONST VOID *SrcBuffer,
IN UINT32 SrcSize, IN UINT32 SrcSize,
IN VOID *DstBuffer, IN VOID *DstBuffer,
IN OUT UINT32 *DstSize IN OUT UINT32 *DstSize
@ -303,7 +303,7 @@ Returns:
mNext = NULL; mNext = NULL;
gPBIT = 4; gPBIT = 4;
mSrc = SrcBuffer; mSrc = (UINT8*)SrcBuffer;
mSrcUpperLimit = mSrc + SrcSize; mSrcUpperLimit = mSrc + SrcSize;
mDst = DstBuffer; mDst = DstBuffer;
mDstUpperLimit = mDst + *DstSize; mDstUpperLimit = mDst + *DstSize;
@ -355,7 +355,7 @@ Returns:
EFI_STATUS EFI_STATUS
TianoCompress( TianoCompress(
IN VOID *SrcBuffer, IN CONST VOID *SrcBuffer,
IN UINT32 SrcSize, IN UINT32 SrcSize,
IN VOID *DstBuffer, IN VOID *DstBuffer,
IN OUT UINT32 *DstSize IN OUT UINT32 *DstSize
@ -398,7 +398,7 @@ EFI_SUCCESS - Compression is successful.
mNext = NULL; mNext = NULL;
gPBIT = 5; gPBIT = 5;
mSrc = SrcBuffer; mSrc = (UINT8*)SrcBuffer;
mSrcUpperLimit = mSrc + SrcSize; mSrcUpperLimit = mSrc + SrcSize;
mDst = DstBuffer; mDst = DstBuffer;
mDstUpperLimit = mDst + *DstSize; mDstUpperLimit = mDst + *DstSize;
@ -596,20 +596,20 @@ Returns: (VOID)
{ {
NODE i; NODE i;
for (i = WNDSIZ; i <= WNDSIZ + UINT8_MAX; i++) { for (i = WNDSIZ; i <= (NODE)(WNDSIZ + UINT8_MAX); i++) {
mLevel[i] = 1; mLevel[i] = 1;
mPosition[i] = NIL; /* sentinel */ mPosition[i] = NIL; /* sentinel */
} }
for (i = WNDSIZ; i < WNDSIZ * 2; i++) { for (i = WNDSIZ; i < (NODE)(WNDSIZ * 2); i++) {
mParent[i] = NIL; mParent[i] = NIL;
} }
mAvail = 1; mAvail = 1;
for (i = 1; i < WNDSIZ - 1; i++) { for (i = 1; i < (NODE)(WNDSIZ - 1); i++) {
mNext[i] = (NODE)(i + 1); mNext[i] = (NODE)(i + 1);
} }
mNext[WNDSIZ - 1] = NIL; mNext[WNDSIZ - 1] = NIL;
for (i = WNDSIZ * 2; i <= MAX_HASH_VAL; i++) { for (i = WNDSIZ * 2; i <= (NODE)MAX_HASH_VAL; i++) {
mNext[i] = NIL; mNext[i] = NIL;
} }
} }
@ -762,7 +762,7 @@ Returns: (VOID)
mPosition[t] = mPos; mPosition[t] = mPos;
t = mParent[t]; t = mParent[t];
} }
if (t < WNDSIZ) { if (t < (NODE)WNDSIZ) {
mPosition[t] = (NODE)(mPos | PERC_FLAG); mPosition[t] = (NODE)(mPos | PERC_FLAG);
} }
} else { } else {
@ -788,7 +788,7 @@ Returns: (VOID)
// //
for ( ; ; ) { for ( ; ; ) {
if (r >= WNDSIZ) { if (r >= (NODE)WNDSIZ) {
j = MAXMATCH; j = MAXMATCH;
mMatchPos = r; mMatchPos = r;
} else { } else {
@ -864,7 +864,7 @@ Returns: (VOID)
mPrev[s] = r; mPrev[s] = r;
r = mParent[mPos]; r = mParent[mPos];
mParent[mPos] = NIL; mParent[mPos] = NIL;
if (r >= WNDSIZ || --mChildCount[r] > 1) { if (r >= (NODE)WNDSIZ || --mChildCount[r] > 1) {
return; return;
} }
t = (NODE)(mPosition[r] & ~PERC_FLAG); t = (NODE)(mPosition[r] & ~PERC_FLAG);
@ -884,7 +884,7 @@ Returns: (VOID)
mPosition[q] = (INT16)(s | WNDSIZ); mPosition[q] = (INT16)(s | WNDSIZ);
q = mParent[q]; q = mParent[q];
} }
if (q < WNDSIZ) { if (q < (NODE)WNDSIZ) {
if (u >= mPos) { if (u >= mPos) {
u -= WNDSIZ; u -= WNDSIZ;
} }