zfs: remove size_t typedef and use grub_size_t instead
* Prevents some toolchains from issuing a warning on size_t redef.
This commit is contained in:
parent
a74336596f
commit
e2296e205e
1 changed files with 5 additions and 6 deletions
|
@ -73,7 +73,6 @@ static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest,
|
||||||
#define U32 grub_uint32_t
|
#define U32 grub_uint32_t
|
||||||
#define S32 grub_int32_t
|
#define S32 grub_int32_t
|
||||||
#define U64 grub_uint64_t
|
#define U64 grub_uint64_t
|
||||||
typedef grub_size_t size_t;
|
|
||||||
|
|
||||||
typedef struct _U16_S {
|
typedef struct _U16_S {
|
||||||
U16 v;
|
U16 v;
|
||||||
|
@ -133,10 +132,10 @@ typedef struct _U64_S {
|
||||||
|
|
||||||
/* Decompression functions */
|
/* Decompression functions */
|
||||||
grub_err_t
|
grub_err_t
|
||||||
lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len);
|
lz4_decompress(void *s_start, void *d_start, grub_size_t s_len, grub_size_t d_len);
|
||||||
|
|
||||||
grub_err_t
|
grub_err_t
|
||||||
lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len)
|
lz4_decompress(void *s_start, void *d_start, grub_size_t s_len, grub_size_t d_len)
|
||||||
{
|
{
|
||||||
const BYTE *src = s_start;
|
const BYTE *src = s_start;
|
||||||
U32 bufsiz = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) |
|
U32 bufsiz = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) |
|
||||||
|
@ -167,7 +166,7 @@ LZ4_uncompress_unknownOutputSize(const char *source,
|
||||||
BYTE *const oend = op + maxOutputSize;
|
BYTE *const oend = op + maxOutputSize;
|
||||||
BYTE *cpy;
|
BYTE *cpy;
|
||||||
|
|
||||||
size_t dec[] = { 0, 3, 2, 3, 0, 0, 0, 0 };
|
grub_size_t dec[] = { 0, 3, 2, 3, 0, 0, 0, 0 };
|
||||||
|
|
||||||
/* Main Loop */
|
/* Main Loop */
|
||||||
while (ip < iend) {
|
while (ip < iend) {
|
||||||
|
@ -237,8 +236,8 @@ LZ4_uncompress_unknownOutputSize(const char *source,
|
||||||
/* copy repeated sequence */
|
/* copy repeated sequence */
|
||||||
if unlikely(op - ref < STEPSIZE) {
|
if unlikely(op - ref < STEPSIZE) {
|
||||||
#if LZ4_ARCH64
|
#if LZ4_ARCH64
|
||||||
size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
grub_size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
||||||
size_t dec2 = dec2table[op - ref];
|
grub_size_t dec2 = dec2table[op - ref];
|
||||||
#else
|
#else
|
||||||
const int dec2 = 0;
|
const int dec2 = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue