浏览代码

[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 年前
父节点
当前提交
11ad0bafbf
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/arch/i386/include/bits/byteswap.h

+ 2
- 2
src/arch/i386/include/bits/byteswap.h 查看文件

@@ -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
 

正在加载...
取消
保存