diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-04-11 12:01:44 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-04-11 12:30:01 -0500 |
commit | 3e48dd4a2d48aabafe22ce3611d65544d0234a69 (patch) | |
tree | 39ec6d5fcdea3a437c8b8ebf18c4d558980c5282 /s390.ld | |
parent | c1958aea51a14199d05d392edce932a956e1674d (diff) |
rtl8139: do not assume TxStatus[] and TxAddr[] are adjacent
Commit afe0a595356192d5f79703cf6462fcc112df007c ("rtl8139: support byte
read to TxStatus registers") reused rtl8139_TxStatus_read() for reading
TxAddr registers. It relies on the fact that TxStatus[] and TxAddr[]
are adjacent.
This causes a gcc warning because the compiler can detect that array
access is out-of-bounds:
hw/rtl8139.c:2501:27: error: array subscript is above array bounds [-Werror=array-bounds]
This patch refactors the function so that we don't rely on out-of-bounds
accesses.
Cc: Jason Wang <jasonwang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 's390.ld')
0 files changed, 0 insertions, 0 deletions