diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-04-08 15:21:11 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-04-08 15:21:11 +0100 |
commit | 2c573106279495795449b0d0373464b597dfe316 (patch) | |
tree | f3c51851c9cf1f0b8d231410aeaec4bc929e7b9b /tests | |
parent | f55a585d1037e5de6088f25e75443c2776786e29 (diff) | |
parent | c19f2b711e15dac4c2cdbace2f8fb3a45fbed0d2 (diff) | |
download | qemu-2c573106279495795449b0d0373464b597dfe316.zip qemu-2c573106279495795449b0d0373464b597dfe316.tar.gz qemu-2c573106279495795449b0d0373464b597dfe316.tar.bz2 |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-04-08' into staging
- Fix a crash in libqos with GCC 9
- Fix usage of wrong boolean types in libqos
# gpg: Signature made Mon 08 Apr 2019 11:48:56 BST
# gpg: using RSA key 2ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/huth-gitlab/tags/pull-request-2019-04-08:
test qgraph.c: Fix segs due to out of scope default
tests/libqos: fix usage of bool in pci-spapr.c
tests/libqos: fix usage of bool in pci-pc.c
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libqos/pci-pc.c | 2 | ||||
-rw-r--r-- | tests/libqos/pci-spapr.c | 2 | ||||
-rw-r--r-- | tests/libqos/qgraph.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/libqos/pci-pc.c b/tests/libqos/pci-pc.c index 4ab16fa..407d8af 100644 --- a/tests/libqos/pci-pc.c +++ b/tests/libqos/pci-pc.c @@ -125,7 +125,7 @@ void qpci_init_pc(QPCIBusPC *qpci, QTestState *qts, QGuestAllocator *alloc) assert(qts); /* tests can use pci-bus */ - qpci->bus.has_buggy_msi = FALSE; + qpci->bus.has_buggy_msi = false; qpci->bus.pio_readb = qpci_pc_pio_readb; qpci->bus.pio_readw = qpci_pc_pio_readw; diff --git a/tests/libqos/pci-spapr.c b/tests/libqos/pci-spapr.c index 6925925..58ba27a 100644 --- a/tests/libqos/pci-spapr.c +++ b/tests/libqos/pci-spapr.c @@ -156,7 +156,7 @@ void qpci_init_spapr(QPCIBusSPAPR *qpci, QTestState *qts, assert(qts); /* tests cannot use spapr, needs to be fixed first */ - qpci->bus.has_buggy_msi = TRUE; + qpci->bus.has_buggy_msi = true; qpci->alloc = alloc; diff --git a/tests/libqos/qgraph.c b/tests/libqos/qgraph.c index 122efc1..b149caa 100644 --- a/tests/libqos/qgraph.c +++ b/tests/libqos/qgraph.c @@ -77,6 +77,7 @@ static void add_edge(const char *source, const char *dest, { char *key; QOSGraphEdgeList *list = g_hash_table_lookup(edge_table, source); + QOSGraphEdgeOptions def_opts = { }; if (!list) { list = g_new0(QOSGraphEdgeList, 1); @@ -85,7 +86,7 @@ static void add_edge(const char *source, const char *dest, } if (!opts) { - opts = &(QOSGraphEdgeOptions) { }; + opts = &def_opts; } QOSGraphEdge *edge = g_new0(QOSGraphEdge, 1); @@ -590,9 +591,10 @@ void qos_add_test(const char *name, const char *interface, { QOSGraphNode *node; char *test_name = g_strdup_printf("%s-tests/%s", interface, name);; + QOSGraphTestOptions def_opts = { }; if (!opts) { - opts = &(QOSGraphTestOptions) { }; + opts = &def_opts; } node = create_node(test_name, QNODE_TEST); node->u.test.function = test_func; |