[Spice-commits] src/decode-glz.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Aug 9 15:29:41 UTC 2020
src/decode-glz.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
New commits:
commit 2b6248490d1222768d011779a33643709e60401a
Author: Frediano Ziglio <freddy77 at gmail.com>
Date: Fri Aug 7 10:51:04 2020 +0100
decode-glz: Remove useless __packed__ attribute
These structures contain only bytes, no need for this attribute.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/src/decode-glz.c b/src/decode-glz.c
index f05b256..3f34098 100644
--- a/src/decode-glz.c
+++ b/src/decode-glz.c
@@ -199,30 +199,22 @@ typedef struct GlibGlzDecoder {
#endif
-#ifdef __GNUC__
-#define ATTR_PACKED __attribute__ ((__packed__))
-#else
-#define ATTR_PACKED
-#pragma pack(push)
-#pragma pack(1)
-#endif
-
/*
* the palette images will be treated as one byte pixels. Their width
* should be transformed accordingly.
*/
-typedef struct ATTR_PACKED one_byte_pixel_t {
+typedef struct one_byte_pixel_t {
uint8_t a;
} one_byte_pixel_t;
-typedef struct ATTR_PACKED rgb32_pixel_t {
+typedef struct rgb32_pixel_t {
uint8_t b;
uint8_t g;
uint8_t r;
uint8_t pad;
} rgb32_pixel_t;
-typedef struct ATTR_PACKED rgb24_pixel_t {
+typedef struct rgb24_pixel_t {
uint8_t b;
uint8_t g;
uint8_t r;
@@ -230,11 +222,6 @@ typedef struct ATTR_PACKED rgb24_pixel_t {
typedef uint16_t rgb16_pixel_t;
-#ifndef __GNUC__
-#pragma pack(pop)
-#endif
-
-#undef ATTR_PACKED
#define LZ_PLT
#define PLT8
More information about the Spice-commits
mailing list