[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/12] srp: Don't use QEMU_PACKED for single element
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 01/12] srp: Don't use QEMU_PACKED for single elements of a structured type |
Date: |
Fri, 14 Sep 2012 09:42:15 +0100 |
From: Stefan Weil <address@hidden>
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 <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/srp.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/srp.h b/hw/srp.h
index 3009bd5..5e0cad5 100644
--- a/hw/srp.h
+++ b/hw/srp.h
@@ -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,
--
1.7.10.4
- [Qemu-devel] [PULL 00/12] Trivial patches for 16 August to 14 September 2012, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 01/12] srp: Don't use QEMU_PACKED for single elements of a structured type,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 05/12] ui: Fix spelling in comment (ressource -> resource), Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 02/12] Spelling fixes in comments and documentation, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 04/12] Spelling fixes in comments and macro names (ressource -> resource), Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 03/12] Fix spelling (licenced -> licensed) in GPL, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 06/12] linux-user: Remove #if 0'd cpu_get_real_ticks() definition, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 07/12] Fix copy&paste typos in documentation comments, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 08/12] console: Clean up bytes per pixel calculation, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 10/12] kvm: Fix warning from static code analysis, Stefan Hajnoczi, 2012/09/14
- [Qemu-devel] [PATCH 12/12] configure: fix seccomp check, Stefan Hajnoczi, 2012/09/14