Browse Source

[build] Avoid strict-aliasing warning for gcc 4.3

Signed-off-by: Bo Yang <boyang@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Bo Yang 11 years ago
parent
commit
11ad0bafbf
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/arch/i386/include/bits/byteswap.h

+ 2
- 2
src/arch/i386/include/bits/byteswap.h View File

53
 static inline __attribute__ (( always_inline )) void
53
 static inline __attribute__ (( always_inline )) void
54
 __bswap_64s ( uint64_t *x ) {
54
 __bswap_64s ( uint64_t *x ) {
55
 	struct {
55
 	struct {
56
-		uint32_t low;
57
-		uint32_t high;
56
+		uint32_t __attribute__ (( may_alias )) low;
57
+		uint32_t __attribute__ (( may_alias )) high;
58
 	} __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
58
 	} __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
59
 	uint32_t discard;
59
 	uint32_t discard;
60
 
60
 

Loading…
Cancel
Save