From 3a407188713ad1ae51ea8609fc3da4fd1fe8fd82 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Jul 2020 19:44:10 +0200 Subject: Fix implicit conversion warnings --- src/qt5_in_gtk.cpp | 2 +- src/x11_in_gtk2.c | 8 ++++---- src/x11_in_gtk3.c | 8 ++++---- src/x11_in_qt5.cpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/qt5_in_gtk.cpp b/src/qt5_in_gtk.cpp index e74ab5d..70a14c0 100644 --- a/src/qt5_in_gtk.cpp +++ b/src/qt5_in_gtk.cpp @@ -221,7 +221,7 @@ suil_wrapper_new(SuilHost* host, LV2_URID ui_updateRate = map->map(map->handle, LV2_UI__updateRate); for (LV2_Options_Option* o = options; o->key; ++o) { if (o->key == ui_updateRate) { - wrap->idle_ms = 1000.0f / *(const float*)o->value; + wrap->idle_ms = (guint)(1000.0f / *(const float*)o->value); break; } } diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index a1ea21d..3041b07 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -294,7 +294,7 @@ forward_size_request(SuilX11Wrapper* socket, // Resize widget window XResizeWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, - width, height); + (unsigned)width, (unsigned)height); // Get actual widget geometry Window root; @@ -308,8 +308,8 @@ forward_size_request(SuilX11Wrapper* socket, &ignored, &ignored); // Center widget in allocation - wx = (allocation->width - ww) / 2; - wy = (allocation->height - wh) / 2; + wx = (allocation->width - (int)ww) / 2; + wy = (allocation->height - (int)wh) / 2; XMoveWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, wx, wy); @@ -559,7 +559,7 @@ suil_wrapper_new(SuilHost* host, LV2_URID ui_updateRate = map->map(map->handle, LV2_UI__updateRate); for (LV2_Options_Option* o = options; o->key; ++o) { if (o->key == ui_updateRate) { - wrap->idle_ms = 1000.0f / *(const float*)o->value; + wrap->idle_ms = (guint)(1000.0f / *(const float*)o->value); break; } } diff --git a/src/x11_in_gtk3.c b/src/x11_in_gtk3.c index 9f6e928..7faab02 100644 --- a/src/x11_in_gtk3.c +++ b/src/x11_in_gtk3.c @@ -217,7 +217,7 @@ forward_size_request(SuilX11Wrapper* socket, // Resize widget window XResizeWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, - width, height); + (unsigned)width, (unsigned)height); // Get actual widget geometry Window root; @@ -231,8 +231,8 @@ forward_size_request(SuilX11Wrapper* socket, &ignored, &ignored); // Center widget in allocation - wx = (allocation->width - ww) / 2; - wy = (allocation->height - wh) / 2; + wx = (allocation->width - (int)ww) / 2; + wy = (allocation->height - (int)wh) / 2; XMoveWindow(GDK_WINDOW_XDISPLAY(window), (Window)socket->instance->ui_widget, wx, wy); @@ -466,7 +466,7 @@ suil_wrapper_new(SuilHost* host, LV2_URID ui_updateRate = map->map(map->handle, LV2_UI__updateRate); for (LV2_Options_Option* o = options; o->key; ++o) { if (o->key == ui_updateRate) { - wrap->idle_ms = 1000.0f / *(const float*)o->value; + wrap->idle_ms = (guint)(1000.0f / *(const float*)o->value); break; } } diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index 97a34dc..204d159 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -89,8 +89,8 @@ protected: if (_window) { XResizeWindow(QX11Info::display(), _window, - event->size().width(), - event->size().height()); + (unsigned)event->size().width(), + (unsigned)event->size().height()); } } -- cgit v1.2.1