diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2014-12-02 04:07:02 +0000 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2014-12-04 19:17:51 +0100 |
commit | fc5dc1c3effb82325a77f2c0c66e95bc7f90de05 (patch) | |
tree | c8e6e8c096a80119fc0fc5427acaa116b5ad56b2 /src/lib | |
parent | 20316990113072cdfdc33a231d8f6340f5e3cbc7 (diff) |
RISCV: get RISCV to build again
This makes lzmadecode 64-bit clean (I hope).
It also cleans up a few other nits.
Change-Id: I24492e9f357e8d3a6de6abc351267f900eb4a19a
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/7623
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/lzmadecode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c index fb57f4fd4d..ada72260f2 100644 --- a/src/lib/lzmadecode.c +++ b/src/lib/lzmadecode.c @@ -20,6 +20,7 @@ */ #include "lzmadecode.h" +#include <stdint.h> #define kNumTopBits 24 #define kTopValue ((UInt32)1 << kNumTopBits) @@ -30,7 +31,7 @@ /* Use 32-bit reads whenever possible to avoid bad flash performance. */ #define RC_READ_BYTE (look_ahead_ptr < 4 ? look_ahead.raw[look_ahead_ptr++] \ - : ((((UInt32) Buffer & 3) || ((SizeT) (BufferLim - Buffer) < 4)) ? (*Buffer++) \ + : ((((uintptr_t) Buffer & 3) || ((SizeT) (BufferLim - Buffer) < 4)) ? (*Buffer++) \ : ((look_ahead.dw = *(UInt32 *)Buffer), (Buffer += 4), (look_ahead_ptr = 1), look_ahead.raw[0]))) #define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \ |