diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-08-10 22:03:27 +0200 |
---|---|---|
committer | Doug Goldstein <cardoe@cardoe.com> | 2012-11-13 22:50:01 -0600 |
commit | 5949a6b083a8ed96d9befc67932f7324dee0020a (patch) | |
tree | 8753ce1f58da8edec7a63be49cec71380c39f189 | |
parent | slirp: Implement TFTP Blocksize option (diff) | |
download | qemu-kvm-5949a6b083a8ed96d9befc67932f7324dee0020a.tar.gz qemu-kvm-5949a6b083a8ed96d9befc67932f7324dee0020a.tar.bz2 qemu-kvm-5949a6b083a8ed96d9befc67932f7324dee0020a.zip |
srp: Don't use QEMU_PACKED for single elements of a structured type
QEMU_PACKED results in a MinGW compiler warning when it is
used for single structure elements:
warning: 'gcc_struct' attribute ignored
Using QEMU_PACKED for the whole structure avoids the compiler warning
without changing the memory layout.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
(cherry picked from commit 93d3ad2a8048469d2b2bb157697425b66b2a37aa)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit 34173da0214a10460ac0856b6ae4f1bd9ae84808)
-rw-r--r-- | hw/srp.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -177,13 +177,13 @@ struct srp_tsk_mgmt { uint8_t reserved1[6]; uint64_t tag; uint8_t reserved2[4]; - uint64_t lun QEMU_PACKED; + uint64_t lun; uint8_t reserved3[2]; uint8_t tsk_mgmt_func; uint8_t reserved4; uint64_t task_tag; uint8_t reserved5[8]; -}; +} QEMU_PACKED; /* * We need the packed attribute because the SRP spec only aligns the @@ -198,14 +198,14 @@ struct srp_cmd { uint8_t data_in_desc_cnt; uint64_t tag; uint8_t reserved2[4]; - uint64_t lun QEMU_PACKED; + uint64_t lun; uint8_t reserved3; uint8_t task_attr; uint8_t reserved4; uint8_t add_cdb_len; uint8_t cdb[16]; uint8_t add_data[0]; -}; +} QEMU_PACKED; enum { SRP_RSP_FLAG_RSPVALID = 1 << 0, |