hw/cxl/cxl-cdat: Fix type of buf in ct3_load_cdat()
commitc4e898d502549025e087aa799211a5c6bd3984ff
authorThomas Huth <thuth@redhat.com>
Mon, 4 Mar 2024 10:44:04 +0000 (4 11:44 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 9 Mar 2024 15:56:37 +0000 (9 18:56 +0300)
tree49229ebfeeea0e0326f7a121fee7b74b1b9406d7
parentb1614f795f0dcacee181f8eefc9572f661ef3adc
hw/cxl/cxl-cdat: Fix type of buf in ct3_load_cdat()

When setting GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_2_58 or higher
(which we'll certainly do in the not too distant future), glib adds
type safety checks to the g_steal_pointer() macro. This trigger an
error in the ct3_load_cdat() function: The local char *buf variable is
assigned to uint8_t *buf in CDATObject, i.e. a pointer of a different
type. Change the local variable to the same type as buf in CDATObject
to avoid the error.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/cxl/cxl-cdat.c