diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2020-04-08 16:06:15 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2020-04-08 16:06:15 +0200 |
commit | 996805ed616d7eab572a4a15cb38321f84aa27d7 (patch) | |
tree | a1c20998153dfc0c99660469fec004142df9a35f | |
parent | 1fa8554a55e7fa8131d1403ab02f10728c4ebcb3 (diff) | |
download | nuk.lv2-996805ed616d7eab572a4a15cb38321f84aa27d7.tar.xz |
various fixes for pedantic compiler warnings.
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | nuk.c | 7 | ||||
-rw-r--r-- | nuk_ui.c | 15 |
3 files changed, 9 insertions, 15 deletions
@@ -1 +1 @@ -0.1.2957 +0.1.2959 @@ -40,8 +40,9 @@ struct _plughandle_t { }; static LV2_Handle -instantiate(const LV2_Descriptor* descriptor, double rate, - const char *bundle_path, const LV2_Feature *const *features) +instantiate(const LV2_Descriptor* descriptor, double rate __attribute__((unused)), + const char *bundle_path __attribute__((unused)), + const LV2_Feature *const *features) { plughandle_t *handle = calloc(1, sizeof(plughandle_t)); if(!handle) @@ -127,7 +128,7 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) } static void -run(LV2_Handle instance, uint32_t nsamples) +run(LV2_Handle instance, uint32_t nsamples __attribute__((unused))) { plughandle_t *handle = instance; @@ -78,7 +78,7 @@ _write_flt(plughandle_t *handle, uint32_t port, float f) } static float -_dial_numeric_behavior(struct nk_context *ctx, struct nk_rect bounds, +_dial_numeric_behavior(struct nk_rect bounds, enum nk_widget_states *states, int *divider, struct nk_input *in) { const struct nk_mouse_button *btn = &in->mouse.buttons[NK_BUTTON_LEFT];; @@ -181,7 +181,7 @@ _dial_double(struct nk_context *ctx, double min, double *val, double max, float if(in && editable) { int divider = 1; - const float dd = _dial_numeric_behavior(ctx, bounds, &states, ÷r, in); + const float dd = _dial_numeric_behavior(bounds, &states, ÷r, in); if(dd != 0.f) // update value { @@ -218,8 +218,6 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data) overview(ctx); #else const float widget_h = 20 * nk_pugl_get_scale(&handle->win); - const float width2 = wbounds.w/2; - const float height2 = wbounds.h/2; const char *window_name = "Nuk"; if(nk_begin(ctx, window_name, wbounds, NK_WINDOW_CLOSABLE | NK_WINDOW_NO_SCROLLBAR)) @@ -379,7 +377,6 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data) if(nk_group_begin(ctx, "Graphs", nuk_f)) { const struct nk_panel *panel = nk_window_get_panel(ctx); - const nk_flags group_f = NK_WINDOW_BORDER | NK_WINDOW_TITLE; const float group_h = panel->bounds.h - panel->footer_height; nk_layout_row_dynamic(ctx, group_h, 2); @@ -401,7 +398,6 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data) if(nk_group_begin(ctx, "Canvas", nuk_f)) { const struct nk_panel *panel = nk_window_get_panel(ctx); - const nk_flags group_f = NK_WINDOW_BORDER | NK_WINDOW_TITLE; const float group_h = panel->bounds.h - panel->footer_height; nk_layout_row_dynamic(ctx, group_h, 1); @@ -449,10 +445,6 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data) if(nk_group_begin(ctx, "Dials", nuk_f)) { - const struct nk_panel *panel = nk_window_get_panel(ctx); - const nk_flags group_f = NK_WINDOW_BORDER | NK_WINDOW_TITLE; - const float group_h = panel->bounds.h - panel->footer_height; - for(unsigned j=0; j<CONTROL_N; j+=4) { nk_layout_row_dynamic(ctx, nk_layout_space_bounds(ctx).w/8, 4); @@ -496,7 +488,8 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data) } static LV2UI_Handle -instantiate(const LV2UI_Descriptor *descriptor, const char *plugin_uri, +instantiate(const LV2UI_Descriptor *descriptor, + const char *plugin_uri __attribute__((unused)), const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) |