read-cis: fix type-punning pointers

Use the proper type instead of int. Fixes:

 src/read-cis.c:62: warning: dereferencing type-punned pointer will break strict-aliasing rules
 src/read-cis.c:62: warning: dereferencing type-punned pointer will break strict-aliasing rules
 src/read-cis.c:85: warning: dereferencing type-punned pointer will break strict-aliasing rules
 src/read-cis.c:87: warning: dereferencing type-punned pointer will break strict-aliasing rules
[...]

Reported-by: Alexander Mansurov <alexander.mansurov@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/src/cistpl.h b/src/cistpl.h
index 8b833ab..79dd0a2 100644
--- a/src/cistpl.h
+++ b/src/cistpl.h
@@ -552,10 +552,17 @@
     cistpl_format_t		format;
 } cisparse_t;
 
+typedef struct tuple_flags {
+    unsigned int               link_space:4;
+    unsigned int               has_link:1;
+    unsigned int               mfc_fn:3;
+    unsigned int               space:4;
+} tuple_flags;
+
 typedef struct tuple_t {
     unsigned int	Attributes;
     unsigned char 	DesiredTuple;
-    unsigned int	Flags;		/* internal use */
+    tuple_flags		Flags;		/* internal use */
     unsigned int	LinkOffset;	/* internal use */
     unsigned int	CISOffset;	/* internal use */
     unsigned char	TupleCode;
@@ -586,13 +593,6 @@
     unsigned char	Data[CISTPL_MAX_CIS_SIZE];
 } cisdump_t;
 
-typedef struct tuple_flags {
-    unsigned int               link_space:4;
-    unsigned int               has_link:1;
-    unsigned int               mfc_fn:3;
-    unsigned int               space:4;
-} tuple_flags;
-
 #define BIND_FN_ALL        0xff
 
 int read_out_cis (unsigned int socket_no, FILE *fd);
diff --git a/src/read-cis.c b/src/read-cis.c
index 43cc1cc..7c51825 100644
--- a/src/read-cis.c
+++ b/src/read-cis.c
@@ -36,10 +36,10 @@
 static unsigned int cis_length = MAX_TUPLES;
 
 
-#define SPACE(f)       (((tuple_flags *)(&(f)))->space)
-#define HAS_LINK(f)    (((tuple_flags *)(&(f)))->has_link)
-#define LINK_SPACE(f)  (((tuple_flags *)(&(f)))->link_space)
-#define MFC_FN(f)      (((tuple_flags *)(&(f)))->mfc_fn)
+#define SPACE(f)       ((f).space)
+#define HAS_LINK(f)    ((f).has_link)
+#define LINK_SPACE(f)  ((f).link_space)
+#define MFC_FN(f)      ((f).mfc_fn)
 
 
 static void read_cis(int attr, unsigned int addr, unsigned int len, void *ptr)
@@ -55,12 +55,12 @@
 
 int pcmcia_get_first_tuple(unsigned int function, tuple_t *tuple)
 {
-	tuple->TupleLink = tuple->Flags = 0;
-	{
-		/* Assume presence of a LONGLINK_C to address 0 */
-		tuple->CISOffset = tuple->LinkOffset = 0;
-		SPACE(tuple->Flags) = HAS_LINK(tuple->Flags) = 1;
-	}
+	tuple->TupleLink = 0;
+	LINK_SPACE(tuple->Flags) = MFC_FN(tuple->Flags) = 0;
+	/* Assume presence of a LONGLINK_C to address 0 */
+	tuple->CISOffset = tuple->LinkOffset = 0;
+	SPACE(tuple->Flags) = HAS_LINK(tuple->Flags) = 1;
+
 	if ((functions > 1) &&
 	    !(tuple->Attributes & TUPLE_RETURN_COMMON)) {
 		unsigned char req = tuple->DesiredTuple;