On 6/29/23 09:40, Richard Henderson wrote:
On 6/27/23 15:02, marcandre.lur...@redhat.com wrote:
static void dbus_update_gl_cb(GObject *source_object,
- GAsyncResult *res,
- gpointer user_data)
+ GAsyncResult *res,
+ gpointer user_data)
{
g_autoptr(GError) err = NULL;
DBusDisplayListener *ddl = user_data;
+ bool success;
+
+#ifdef CONFIG_GBM
+ success = qemu_dbus_display1_listener_call_update_dmabuf_finish(
+ ddl->proxy, res, &err);
+#endif
+
+#ifdef WIN32
+ success =
qemu_dbus_display1_listener_win32_d3d11_call_update_texture2d_finish(
+ ddl->d3d11_proxy, res, &err);
+ d3d_texture2d_acquire0(ddl->d3d_texture, &error_warn);
+#endif
- if (!qemu_dbus_display1_listener_call_update_dmabuf_finish(ddl->proxy,
- res, &err)) {
+ if (!success) {
error_report("Failed to call update: %s", err->message);
}
With neither CONFIG_GBM nor WIN32, success is not set:
../alt/ui/dbus-listener.c:199:10: error: variable 'success' is uninitialized when used
here [-Werror,-Wuninitialized]
if (!success) {
^~~~~~~
Bah. Working around that, the whole function isn't used under these same
conditions:
../alt/ui/dbus-listener.c:180:13: error: unused function 'dbus_update_gl_cb'
[-Werror,-Wunused-function]
static void dbus_update_gl_cb(GObject *source_object, GAsyncResult *res,
^
1 error generated.
Definitely some cleanup to the ifdefs required...
r~