diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/.clang-tidy | 3 | ||||
-rw-r--r-- | plugins/eg-amp.lv2/meson.build | 1 | ||||
-rw-r--r-- | plugins/eg-fifths.lv2/meson.build | 1 | ||||
-rw-r--r-- | plugins/eg-metro.lv2/meson.build | 1 | ||||
-rw-r--r-- | plugins/eg-midigate.lv2/meson.build | 1 | ||||
-rw-r--r-- | plugins/eg-params.lv2/meson.build | 1 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/meson.build | 2 | ||||
-rw-r--r-- | plugins/eg-sampler.lv2/sampler_ui.c | 4 | ||||
-rw-r--r-- | plugins/eg-scope.lv2/examploscope_ui.c | 18 | ||||
-rw-r--r-- | plugins/eg-scope.lv2/meson.build | 2 |
10 files changed, 24 insertions, 10 deletions
diff --git a/plugins/.clang-tidy b/plugins/.clang-tidy index 44bac70..b327b36 100644 --- a/plugins/.clang-tidy +++ b/plugins/.clang-tidy @@ -1,4 +1,4 @@ -# Copyright 2020-2023 David Robillard <d@drobilla.net> +# Copyright 2020-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC Checks: > @@ -8,6 +8,7 @@ Checks: > -bugprone-multi-level-implicit-pointer-conversion, -bugprone-suspicious-realloc-usage, -cert-err33-c, + -clang-analyzer-core.NullDereference, -hicpp-signed-bitwise, -llvm-header-guard, -misc-unused-parameters, diff --git a/plugins/eg-amp.lv2/meson.build b/plugins/eg-amp.lv2/meson.build index 726038e..2912e3f 100644 --- a/plugins/eg-amp.lv2/meson.build +++ b/plugins/eg-amp.lv2/meson.build @@ -11,6 +11,7 @@ module = shared_library( c_args: c_suppressions, dependencies: [lv2_dep, m_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', diff --git a/plugins/eg-fifths.lv2/meson.build b/plugins/eg-fifths.lv2/meson.build index bba21ce..d0cbc6a 100644 --- a/plugins/eg-fifths.lv2/meson.build +++ b/plugins/eg-fifths.lv2/meson.build @@ -11,6 +11,7 @@ module = shared_library( c_args: c_suppressions, dependencies: [lv2_dep, m_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', diff --git a/plugins/eg-metro.lv2/meson.build b/plugins/eg-metro.lv2/meson.build index 5d83c9e..ee4016e 100644 --- a/plugins/eg-metro.lv2/meson.build +++ b/plugins/eg-metro.lv2/meson.build @@ -11,6 +11,7 @@ module = shared_library( c_args: c_suppressions, dependencies: [lv2_dep, m_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', diff --git a/plugins/eg-midigate.lv2/meson.build b/plugins/eg-midigate.lv2/meson.build index 9f0a5ac..fc6010b 100644 --- a/plugins/eg-midigate.lv2/meson.build +++ b/plugins/eg-midigate.lv2/meson.build @@ -11,6 +11,7 @@ module = shared_library( c_args: c_suppressions, dependencies: [lv2_dep, m_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', diff --git a/plugins/eg-params.lv2/meson.build b/plugins/eg-params.lv2/meson.build index 00602bc..83c6ef9 100644 --- a/plugins/eg-params.lv2/meson.build +++ b/plugins/eg-params.lv2/meson.build @@ -11,6 +11,7 @@ module = shared_library( c_args: c_suppressions, dependencies: [lv2_dep, m_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', diff --git a/plugins/eg-sampler.lv2/meson.build b/plugins/eg-sampler.lv2/meson.build index fe81918..a0f8799 100644 --- a/plugins/eg-sampler.lv2/meson.build +++ b/plugins/eg-sampler.lv2/meson.build @@ -34,6 +34,7 @@ if samplerate_dep.found() and sndfile_dep.found() c_args: c_suppressions, dependencies: [lv2_dep, m_dep, samplerate_dep, sndfile_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', @@ -72,6 +73,7 @@ if samplerate_dep.found() and sndfile_dep.found() c_args: ui_suppressions, dependencies: [lv2_dep, gtk2_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', diff --git a/plugins/eg-sampler.lv2/sampler_ui.c b/plugins/eg-sampler.lv2/sampler_ui.c index b02082a..769dde0 100644 --- a/plugins/eg-sampler.lv2/sampler_ui.c +++ b/plugins/eg-sampler.lv2/sampler_ui.c @@ -183,13 +183,13 @@ on_canvas_expose(GtkWidget* widget, GdkEventExpose* event, gpointer data) // Draw line through top peaks for (int i = 0; i < n_peaks; ++i) { const float peak = peaks[i]; - cairo_line_to(cr, i * scale, mid_y + (peak / 2.0f) * size.height); + cairo_line_to(cr, i * scale, mid_y + ((peak / 2.0f) * size.height)); } // Continue through bottom peaks for (int i = n_peaks - 1; i >= 0; --i) { const float peak = peaks[i]; - cairo_line_to(cr, i * scale, mid_y - (peak / 2.0f) * size.height); + cairo_line_to(cr, i * scale, mid_y - ((peak / 2.0f) * size.height)); } // Close shape diff --git a/plugins/eg-scope.lv2/examploscope_ui.c b/plugins/eg-scope.lv2/examploscope_ui.c index 2ad42dc..4f366aa 100644 --- a/plugins/eg-scope.lv2/examploscope_ui.c +++ b/plugins/eg-scope.lv2/examploscope_ui.c @@ -110,6 +110,8 @@ send_ui_state(LV2UI_Handle handle) lv2_atom_total_size(msg), ui->uris.atom_eventTransfer, msg); + + lv2_atom_forge_set_buffer(&ui->forge, NULL, 0); } /** Notify backend that UI is closed. */ @@ -134,6 +136,8 @@ send_ui_disable(LV2UI_Handle handle) lv2_atom_total_size(msg), ui->uris.atom_eventTransfer, msg); + + lv2_atom_forge_set_buffer(&ui->forge, NULL, 0); } /** @@ -220,10 +224,10 @@ on_expose_event(GtkWidget* widget, GdkEventExpose* ev, gpointer data) * - (DAHEIGHT / 2) * (VAL) * (GAIN) * ) */ - const float chn_y_offset = DAHEIGHT * c + DAHEIGHT * 0.5f - 0.5f; - const float chn_y_scale = DAHEIGHT * 0.5f * gain; + const float chn_y_offset = (DAHEIGHT * c) + (DAHEIGHT * 0.5f) - 0.5f; + const float chn_y_scale = (DAHEIGHT * 0.5f) * gain; -#define CYPOS(VAL) (chn_y_offset - (VAL) * chn_y_scale) +#define CYPOS(VAL) (chn_y_offset - ((VAL) * chn_y_scale)) cairo_save(cr); @@ -293,15 +297,15 @@ on_expose_event(GtkWidget* widget, GdkEventExpose* ev, gpointer data) // Channel separator if (c > 0) { cairo_set_source_rgba(cr, .5, .5, .5, 1.0); - cairo_move_to(cr, 0, DAHEIGHT * c - .5); - cairo_line_to(cr, DAWIDTH, DAHEIGHT * c - .5); + cairo_move_to(cr, 0, (DAHEIGHT * c) - .5); + cairo_line_to(cr, DAWIDTH, (DAHEIGHT * c) - .5); cairo_stroke(cr); } // Zero scale line cairo_set_source_rgba(cr, .3, .3, .7, .5); - cairo_move_to(cr, 0, DAHEIGHT * (c + .5) - .5); - cairo_line_to(cr, DAWIDTH, DAHEIGHT * (c + .5) - .5); + cairo_move_to(cr, 0, (DAHEIGHT * (c + .5)) - .5); + cairo_line_to(cr, DAWIDTH, (DAHEIGHT * (c + .5)) - .5); cairo_stroke(cr); } diff --git a/plugins/eg-scope.lv2/meson.build b/plugins/eg-scope.lv2/meson.build index d776ee7..84e17ba 100644 --- a/plugins/eg-scope.lv2/meson.build +++ b/plugins/eg-scope.lv2/meson.build @@ -19,6 +19,7 @@ module = shared_library( c_args: c_suppressions, dependencies: [lv2_dep, m_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', @@ -55,6 +56,7 @@ if gtk2_dep.found() c_args: c_suppressions, dependencies: [lv2_dep, gtk2_dep], gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, install: true, install_dir: lv2dir / bundle_name, name_prefix: '', |