diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-09-04 13:57:07 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@coresystems.de> | 2009-09-04 13:57:07 +0000 |
commit | 83ef92df2a822155ebaf33f9197b46be66ce2926 (patch) | |
tree | 403b199fd7a5bbac14997a53e90973f39bd0162d /physmap.c | |
parent | e8fe731c1b3624faa6a3328edf671059cf4a8f8b (diff) | |
download | flashrom-83ef92df2a822155ebaf33f9197b46be66ce2926.zip flashrom-83ef92df2a822155ebaf33f9197b46be66ce2926.tar.gz |
Fix for gcc 4.4 strict aliasing rules
Corresponding to flashrom svn r714.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'physmap.c')
-rw-r--r-- | physmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -133,7 +133,7 @@ static int fd_msr = -1; msr_t rdmsr(int addr) { - uint8_t buf[8]; + uint32_t buf[2]; msr_t msr = { 0xffffffff, 0xffffffff }; if (lseek(fd_msr, (off_t) addr, SEEK_SET) == -1) { @@ -143,8 +143,8 @@ msr_t rdmsr(int addr) } if (read(fd_msr, buf, 8) == 8) { - msr.lo = *(uint32_t *)buf; - msr.hi = *(uint32_t *)(buf + 4); + msr.lo = buf[0]; + msr.hi = buf[1]; return msr; } |