From 9665d0bcff2ee62942d11486d81ce85b688a46a9 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Thu, 9 Jan 2014 15:06:12 +0000 Subject: [PATCH] Version 0.15.0.1 - Some type conversions to remove warnings on 64 bit compilation --- Tiano/EfiCompress.c | 16 ++++++++-------- Tiano/TianoCompress.c | 16 ++++++++-------- ffsengine.cpp | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Tiano/EfiCompress.c b/Tiano/EfiCompress.c index af05b53..f3ae97c 100644 --- a/Tiano/EfiCompress.c +++ b/Tiano/EfiCompress.c @@ -509,20 +509,20 @@ Returns: (VOID) { NODE i; - for (i = WNDSIZ; i <= WNDSIZ + UINT8_MAX; i++) { + for (i = (NODE) WNDSIZ; i <= (NODE) WNDSIZ + UINT8_MAX; i++) { mLevel[i] = 1; mPosition[i] = NIL; /* sentinel */ } - for (i = WNDSIZ; i < WNDSIZ * 2; i++) { + for (i = (NODE) WNDSIZ; i < (NODE) WNDSIZ * 2; i++) { mParent[i] = NIL; } mAvail = 1; - for (i = 1; i < WNDSIZ - 1; i++) { + for (i = 1; i < (NODE) WNDSIZ - 1; i++) { mNext[i] = (NODE)(i + 1); } mNext[WNDSIZ - 1] = NIL; - for (i = WNDSIZ * 2; i <= MAX_HASH_VAL; i++) { + for (i = (NODE) WNDSIZ * 2; i <= (NODE) MAX_HASH_VAL; i++) { mNext[i] = NIL; } } @@ -675,7 +675,7 @@ Returns: (VOID) mPosition[t] = mPos; t = mParent[t]; } - if (t < WNDSIZ) { + if (t < (NODE) WNDSIZ) { mPosition[t] = (NODE)(mPos | PERC_FLAG); } } else { @@ -701,7 +701,7 @@ Returns: (VOID) // for ( ; ; ) { - if (r >= WNDSIZ) { + if (r >= (NODE) WNDSIZ) { j = MAXMATCH; mMatchPos = r; } else { @@ -777,7 +777,7 @@ Returns: (VOID) mPrev[s] = r; r = mParent[mPos]; mParent[mPos] = NIL; - if (r >= WNDSIZ || --mChildCount[r] > 1) { + if (r >= (NODE) WNDSIZ || --mChildCount[r] > 1) { return; } t = (NODE)(mPosition[r] & ~PERC_FLAG); @@ -797,7 +797,7 @@ Returns: (VOID) mPosition[q] = (INT16)(s | WNDSIZ); q = mParent[q]; } - if (q < WNDSIZ) { + if (q < (NODE) WNDSIZ) { if (u >= mPos) { u -= WNDSIZ; } diff --git a/Tiano/TianoCompress.c b/Tiano/TianoCompress.c index 970f7a9..37b5fa1 100644 --- a/Tiano/TianoCompress.c +++ b/Tiano/TianoCompress.c @@ -522,22 +522,22 @@ STATIC { NODE Index; - for (Index = WNDSIZ; Index <= WNDSIZ + UINT8_MAX; Index++) { + for (Index = (NODE) WNDSIZ; Index <= (NODE) WNDSIZ + UINT8_MAX; Index++) { mLevel[Index] = 1; mPosition[Index] = NIL; // sentinel } - for (Index = WNDSIZ; Index < WNDSIZ * 2; Index++) { + for (Index = (NODE) WNDSIZ; Index < (NODE) WNDSIZ * 2; Index++) { mParent[Index] = NIL; } mAvail = 1; - for (Index = 1; Index < WNDSIZ - 1; Index++) { + for (Index = 1; Index < (NODE) WNDSIZ - 1; Index++) { mNext[Index] = (NODE) (Index + 1); } mNext[WNDSIZ - 1] = NIL; - for (Index = WNDSIZ * 2; Index <= MAX_HASH_VAL; Index++) { + for (Index = (NODE) WNDSIZ * 2; Index <= (NODE) MAX_HASH_VAL; Index++) { mNext[Index] = NIL; } } @@ -705,7 +705,7 @@ STATIC NodeT = mParent[NodeT]; } - if (NodeT < WNDSIZ) { + if (NodeT < (NODE) WNDSIZ) { mPosition[NodeT] = (NODE) (mPos | (UINT32) PERC_FLAG); } } else { @@ -729,7 +729,7 @@ STATIC // Node split or creation is involved. // for (;;) { - if (NodeR >= WNDSIZ) { + if (NodeR >= (NODE) WNDSIZ) { Index2 = MAXMATCH; mMatchPos = NodeR; } else { @@ -819,7 +819,7 @@ STATIC mPrev[NodeS] = NodeR; NodeR = mParent[mPos]; mParent[mPos] = NIL; - if (NodeR >= WNDSIZ) { + if (NodeR >= (NODE) WNDSIZ) { return ; } @@ -851,7 +851,7 @@ STATIC NodeU = mPosition[NodeQ]; } - if (NodeQ < WNDSIZ) { + if (NodeQ < (NODE) WNDSIZ) { if (NodeU >= mPos) { NodeU -= WNDSIZ; } diff --git a/ffsengine.cpp b/ffsengine.cpp index df5b28d..3734a7a 100644 --- a/ffsengine.cpp +++ b/ffsengine.cpp @@ -1242,7 +1242,7 @@ UINT8 FfsEngine::create(const QModelIndex & index, const UINT8 type, const QByte if (model->type(parent) != File && model->type(parent) != Section) return ERR_INVALID_SECTION; - if (header.size() < sizeof(EFI_COMMON_SECTION_HEADER)) + if (header.size() < (int) sizeof(EFI_COMMON_SECTION_HEADER)) return ERR_INVALID_SECTION; QByteArray newHeader = header;