diff options
author | David Robillard <d@drobilla.net> | 2022-05-29 14:56:15 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-29 14:56:15 -0400 |
commit | d0dbe0b732ba751e6846e2b1676df2f3b55161fd (patch) | |
tree | a5c69c76d97a9d6bfe874c74395ee0b052935498 | |
parent | 5fac651aebabc9406cd78fe280311f6184a7fa85 (diff) | |
download | suil-d0dbe0b732ba751e6846e2b1676df2f3b55161fd.tar.gz suil-d0dbe0b732ba751e6846e2b1676df2f3b55161fd.tar.bz2 suil-d0dbe0b732ba751e6846e2b1676df2f3b55161fd.zip |
Fix warnings on MacOS
-rw-r--r-- | src/cocoa_in_gtk2.mm | 18 | ||||
-rw-r--r-- | src/cocoa_in_qt5.mm | 7 | ||||
-rw-r--r-- | wscript | 3 |
3 files changed, 21 insertions, 7 deletions
diff --git a/src/cocoa_in_gtk2.mm b/src/cocoa_in_gtk2.mm index 0bf9fe7..204976b 100644 --- a/src/cocoa_in_gtk2.mm +++ b/src/cocoa_in_gtk2.mm @@ -132,10 +132,13 @@ suil_cocoa_size_request(GtkWidget* widget, GtkRequisition* requisition) requisition->width = self->req_width; requisition->height = self->req_height; } else { - NSView* view = (NSView*)self->instance->ui_widget; - NSRect frame = [view frame]; - requisition->width = CGRectGetWidth(NSRectToCGRect(frame)); - requisition->height = CGRectGetHeight(NSRectToCGRect(frame)); + NSView* view = (NSView*)self->instance->ui_widget; + NSRect frame = [view frame]; + + requisition->width = + static_cast<int>(CGRectGetWidth(NSRectToCGRect(frame))); + requisition->height = + static_cast<int>(CGRectGetHeight(NSRectToCGRect(frame))); } } @@ -286,6 +289,8 @@ suil_cocoa_wrapper_idle(void* data) static GdkFilterReturn event_filter(GdkXEvent* xevent, GdkEvent* event, gpointer data) { + (void)event; + SuilCocoaWrapper* wrap = (SuilCocoaWrapper*)data; if (!wrap->instance || !wrap->wrapper || !wrap->wrapper->impl) { return GDK_FILTER_CONTINUE; @@ -382,6 +387,9 @@ suil_wrapper_new(SuilHost* host, LV2_Feature*** features, unsigned n_features) { + (void)host; + (void)host_type_uri; + GtkWidget* parent = NULL; for (unsigned i = 0; i < n_features; ++i) { if (!strcmp((*features)[i]->URI, LV2_UI__parent)) { @@ -435,7 +443,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 = static_cast<guint>(1000.0f / *(const float*)o->value); break; } } diff --git a/src/cocoa_in_qt5.mm b/src/cocoa_in_qt5.mm index 9006c08..5a7e5b0 100644 --- a/src/cocoa_in_qt5.mm +++ b/src/cocoa_in_qt5.mm @@ -51,8 +51,8 @@ public: NSView* view = (NSView*)instance->ui_widget; setCocoaView((NSView*)instance->ui_widget); - setMinimumWidth([view fittingSize].width); - setMinimumHeight([view fittingSize].height); + setMinimumWidth(static_cast<int>([view fittingSize].width)); + setMinimumHeight(static_cast<int>([view fittingSize].height)); if (_idle_iface && _ui_timer == 0) { _ui_timer = this->startTimer(30); @@ -133,6 +133,9 @@ suil_wrapper_new(SuilHost* host, LV2_Feature*** features, unsigned n_features) { + (void)host; + (void)host_type_uri; + QWidget* parent = NULL; for (unsigned i = 0; i < n_features; ++i) { if (!strcmp((*features)[i]->URI, LV2_UI__parent)) { @@ -72,8 +72,11 @@ def configure(conf): ], 'clang': [ '-Wno-cast-qual', + '-Wno-deprecated-declarations', # Mac '-Wno-disabled-macro-expansion', '-Wno-padded', + '-Wno-reserved-id-macro', # Mac + '-Wno-switch-enum', # Mac ] }) |