[PATCH] libxenguest: drop now unused le32_to_cpup() from lz4 decompression

Jan Beulich posted 1 patch 3 years, 2 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/72d7e54f-e0df-03e6-0752-9d8937f666f2@suse.com
[PATCH] libxenguest: drop now unused le32_to_cpup() from lz4 decompression
Posted by Jan Beulich 3 years, 2 months ago
While gcc doesn't warn about this because of it being static inline,
clang does, causing the build to fail there because of -Werror.

Fixes: d8099d94dfaa ("libxenguest: add get_unaligned_le32()")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/libs/guest/xg_dom_decompress_lz4.c
+++ b/tools/libs/guest/xg_dom_decompress_lz4.c
@@ -22,11 +22,6 @@ static inline uint_fast16_t le16_to_cpup
     return buf[0] | (buf[1] << 8);
 }
 
-static inline uint_fast32_t le32_to_cpup(const unsigned char *buf)
-{
-    return le16_to_cpup(buf) | ((uint32_t)le16_to_cpup(buf + 2) << 16);
-}
-
 #include "../../xen/include/xen/lz4.h"
 #include "../../xen/common/decompress.h"
 

Re: [PATCH] libxenguest: drop now unused le32_to_cpup() from lz4 decompression
Posted by Andrew Cooper 3 years, 2 months ago
On 27/01/2021 10:34, Jan Beulich wrote:
> While gcc doesn't warn about this because of it being static inline,
> clang does, causing the build to fail there because of -Werror.
>
> Fixes: d8099d94dfaa ("libxenguest: add get_unaligned_le32()")
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>