- Fix a crash in libqos with GCC 9

- Fix usage of wrong boolean types in libqos
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJcqycYAAoJEC7Z13T+cC218ScQAKJPgQ5x4b+EdKQJt0dWWuXm
 OL/xxj1RV0XJzMOftxIXJDz8hHEbSlC26VMGjJPi/pLn+5kjum/HqZ/3NotiavbF
 I5ijhAPm0OkgCQ7/KCLGrrczVN3IribKp/ZnsL+4uzGO2dBulW/bnK1O0AOFgWj3
 jRIf2Jhn84y23CRn5TiIyTeLFzCbJyKk013qqSs/kxHHKcfFOJKg/4gwgof8LA2i
 tSXEtSGL00Lo4mwxdJmfTHO9mefNXcM58Dp2SFSvMQpk3OnBi1DR62PqKQrJ1MMt
 XEzolqZrUsF813PdX2g9isEQh0tBBLBS1v1MofYRX1ngm0rKH9xkTE9hbYSfNoHM
 QRZmceTaGaNN+K8nsdHFz9OHU1wpgwcKFSniaWd7gMK0UQb0Z/HkUBeyZC2uP/QN
 n1GI8/fNcD8/g5pEgkQDz0BHtKM/owiiHEEz+8qvnWjnZmuKEu89mlkCmNzfVbKP
 luDtXyibxq0mdPloWm+f72W/eyGlxiTCnO6+j1gxA0wpB2LSnIyJNuy5M4aQqI/O
 lIoSSoqRLnN5yGJ7pxtCdNbmUIrJBkoo6cEPBKlgn2BsBAaVQLpBQ01dMXJwQc/S
 d2jXEcElKPNPCi9+ebmuIaz/q5owISppeSRu1amy/GO+ozgPN6RJb3kRUfHXnzde
 jTmS8dVlXOMfwnAulII+
 =frEw
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Peter Maydell 2019-04-08 15:21:11 +01:00
commit 2c57310627
3 changed files with 6 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;