2017-08-16 15:14:30 +00:00
|
|
|
From fa42786264cef98c56e972b3bb6b8448000e1c70 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Pete Batard <pete@akeo.ie>
|
|
|
|
Date: Thu, 3 Aug 2017 15:46:15 +0100
|
2018-04-06 19:38:57 +00:00
|
|
|
Subject: [PATCH 051/227] zfs: remove size_t typedef and use grub_size_t
|
2017-08-16 15:14:30 +00:00
|
|
|
instead
|
|
|
|
|
|
|
|
* Prevents some toolchains from issuing a warning on size_t redef.
|
|
|
|
---
|
|
|
|
grub-core/fs/zfs/zfs_lz4.c | 11 +++++------
|
|
|
|
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/grub-core/fs/zfs/zfs_lz4.c b/grub-core/fs/zfs/zfs_lz4.c
|
2018-02-27 18:56:41 +00:00
|
|
|
index 2f73449f0d4..5453822d025 100644
|
2017-08-16 15:14:30 +00:00
|
|
|
--- a/grub-core/fs/zfs/zfs_lz4.c
|
|
|
|
+++ b/grub-core/fs/zfs/zfs_lz4.c
|
|
|
|
@@ -73,7 +73,6 @@ static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest,
|
|
|
|
#define U32 grub_uint32_t
|
|
|
|
#define S32 grub_int32_t
|
|
|
|
#define U64 grub_uint64_t
|
|
|
|
-typedef grub_size_t size_t;
|
|
|
|
|
|
|
|
typedef struct _U16_S {
|
|
|
|
U16 v;
|
|
|
|
@@ -133,10 +132,10 @@ typedef struct _U64_S {
|
|
|
|
|
|
|
|
/* Decompression functions */
|
|
|
|
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
|
|
|
|
-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;
|
|
|
|
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 *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 */
|
|
|
|
while (ip < iend) {
|
|
|
|
@@ -237,8 +236,8 @@ LZ4_uncompress_unknownOutputSize(const char *source,
|
|
|
|
/* copy repeated sequence */
|
|
|
|
if unlikely(op - ref < STEPSIZE) {
|
|
|
|
#if LZ4_ARCH64
|
|
|
|
- size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
|
|
|
- size_t dec2 = dec2table[op - ref];
|
|
|
|
+ grub_size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
|
|
|
+ grub_size_t dec2 = dec2table[op - ref];
|
|
|
|
#else
|
|
|
|
const int dec2 = 0;
|
|
|
|
#endif
|
|
|
|
--
|
2018-02-27 18:56:41 +00:00
|
|
|
2.15.0
|
2017-08-16 15:14:30 +00:00
|
|
|
|