Sfoglia il codice sorgente

[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 anni fa
parent
commit
11ad0bafbf
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      src/arch/i386/include/bits/byteswap.h

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

@@ -53,8 +53,8 @@ __bswap_variable_64 ( uint64_t x ) {
53 53
 static inline __attribute__ (( always_inline )) void
54 54
 __bswap_64s ( uint64_t *x ) {
55 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 58
 	} __attribute__ (( may_alias )) *dwords = ( ( void * ) x );
59 59
 	uint32_t discard;
60 60
 

Loading…
Annulla
Salva