diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2019-03-29 11:11:02 +0000 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2019-04-03 11:19:57 +0200 |
commit | bea0279b72fcd7bf5b5305fabf3a3cbee3a3eaa6 (patch) | |
tree | d4f7bb2c53541318f1e5ddbc7f6fb3bf04835804 /hw/s390x/ipl.c | |
parent | e1d0b37261e6b7db18ebef6f1815489309312906 (diff) | |
download | qemu-bea0279b72fcd7bf5b5305fabf3a3cbee3a3eaa6.zip qemu-bea0279b72fcd7bf5b5305fabf3a3cbee3a3eaa6.tar.gz qemu-bea0279b72fcd7bf5b5305fabf3a3cbee3a3eaa6.tar.bz2 |
hw/s390/css: avoid taking address members in packed structs
The GCC 9 compiler complains about many places in s390 code
that take the address of members of the 'struct SCHIB' which
is marked packed:
hw/s390x/css.c: In function ‘sch_handle_clear_func’:
hw/s390x/css.c:698:15: warning: taking address of packed member of ‘struct SCHIB’ may result in an unaligned pointer val\
ue [-Waddress-of-packed-member]
698 | PMCW *p = &sch->curr_status.pmcw;
| ^~~~~~~~~~~~~~~~~~~~~~
hw/s390x/css.c:699:15: warning: taking address of packed member of ‘struct SCHIB’ may result in an unaligned pointer val\
ue [-Waddress-of-packed-member]
699 | SCSW *s = &sch->curr_status.scsw;
| ^~~~~~~~~~~~~~~~~~~~~~
...snip many more...
Almost all of these are just done for convenience to avoid
typing out long variable/field names when referencing struct
members. We can get most of this convenience by taking the
address of the 'struct SCHIB' instead, avoiding triggering
the compiler warnings.
In a couple of places we copy via a local variable which is
a technique already applied elsewhere in s390 code for this
problem.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190329111104.17223-13-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/ipl.c')
0 files changed, 0 insertions, 0 deletions