aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lv2lint.c12
-rw-r--r--lv2lint.h2
-rw-r--r--lv2lint_parameter.c38
-rw-r--r--lv2lint_plugin.c148
-rw-r--r--lv2lint_port.c39
-rw-r--r--lv2lint_ui.c49
-rw-r--r--meson.build3
7 files changed, 153 insertions, 138 deletions
diff --git a/lv2lint.c b/lv2lint.c
index c500d0d..f52905f 100644
--- a/lv2lint.c
+++ b/lv2lint.c
@@ -432,7 +432,8 @@ strsep(char **sp, char *sep)
#endif
static int
-_vprintf(void *data, LV2_URID type, const char *fmt, va_list args)
+_vprintf(void *data __unused, LV2_URID type __unused, const char *fmt,
+ va_list args)
{
char *buf = NULL;
@@ -471,7 +472,7 @@ _printf(void *data, LV2_URID type, const char *fmt, ...)
}
static char *
-_mkpath(LV2_State_Make_Path_Handle instance, const char *abstract_path)
+_mkpath(LV2_State_Make_Path_Handle instance __unused, const char *abstract_path)
{
char *absolute_path = NULL;
@@ -482,7 +483,8 @@ _mkpath(LV2_State_Make_Path_Handle instance, const char *abstract_path)
}
static LV2_Resize_Port_Status
-_resize(LV2_Resize_Port_Feature_Data instance, uint32_t index, size_t size)
+_resize(LV2_Resize_Port_Feature_Data instance __unused, uint32_t index __unused,
+ size_t size __unused)
{
return LV2_RESIZE_PORT_SUCCESS;
}
@@ -770,8 +772,8 @@ test_shared_libraries(const char *path, const char *const *whitelist,
#endif
static void
-_state_set_value(const char *symbol, void *data,
- const void *value, uint32_t size, uint32_t type)
+_state_set_value(const char *symbol __unused, void *data __unused,
+ const void *value __unused, uint32_t size __unused, uint32_t type __unused)
{
//FIXME
}
diff --git a/lv2lint.h b/lv2lint.h
index ceebd8e..9d70d18 100644
--- a/lv2lint.h
+++ b/lv2lint.h
@@ -38,6 +38,8 @@
# include <curl/curl.h>
#endif
+#define __unused __attribute__((unused))
+
typedef enum _ansi_color_t {
ANSI_COLOR_BOLD,
ANSI_COLOR_RED,
diff --git a/lv2lint_parameter.c b/lv2lint_parameter.c
index 1a4db1f..2259225 100644
--- a/lv2lint_parameter.c
+++ b/lv2lint_parameter.c
@@ -24,11 +24,11 @@ static const ret_t *
_test_label(app_t *app)
{
static const ret_t ret_label_not_found = {
- LINT_FAIL, "rdfs:label not found", LV2_CORE_PREFIX"Parameter"},
+ LINT_FAIL, "rdfs:label not found", LV2_CORE_PREFIX"Parameter", NULL},
ret_label_not_a_string = {
- LINT_FAIL, "rdfs:label not a string", LILV_NS_DOAP"label"},
+ LINT_FAIL, "rdfs:label not a string", LILV_NS_DOAP"label", NULL},
ret_label_empty = {
- LINT_FAIL, "rdfs:label empty", LILV_NS_DOAP"label"};
+ LINT_FAIL, "rdfs:label empty", LILV_NS_DOAP"label", NULL};
const ret_t *ret = NULL;
@@ -62,11 +62,11 @@ static const ret_t *
_test_comment(app_t *app)
{
static const ret_t ret_comment_not_found = {
- LINT_NOTE, "rdfs:comment not found", LV2_CORE_PREFIX"Parameter"},
+ LINT_NOTE, "rdfs:comment not found", LV2_CORE_PREFIX"Parameter", NULL},
ret_comment_not_a_string = {
- LINT_FAIL, "rdfs:comment not a string", LILV_NS_DOAP"comment"},
+ LINT_FAIL, "rdfs:comment not a string", LILV_NS_DOAP"comment", NULL},
ret_comment_empty = {
- LINT_FAIL, "rdfs:comment empty", LILV_NS_DOAP"comment"};
+ LINT_FAIL, "rdfs:comment empty", LILV_NS_DOAP"comment", NULL};
const ret_t *ret = NULL;
@@ -99,27 +99,27 @@ static const ret_t *
_test_range(app_t *app)
{
static const ret_t ret_range_not_found = {
- LINT_FAIL, "rdfs:range not found", LV2_CORE_PREFIX"Parameter"},
+ LINT_FAIL, "rdfs:range not found", LV2_CORE_PREFIX"Parameter", NULL},
ret_range_not_a_uri = {
- LINT_FAIL, "rdfs:range not a URI", LILV_NS_DOAP"range"},
+ LINT_FAIL, "rdfs:range not a URI", LILV_NS_DOAP"range", NULL},
ret_range_not_an_atom = {
- LINT_WARN, "rdfs:range not an lv2:Atom", LV2_ATOM__Atom},
+ LINT_WARN, "rdfs:range not an lv2:Atom", LV2_ATOM__Atom, NULL},
ret_range_empty = {
- LINT_FAIL, "rdfs:range empty", LILV_NS_DOAP"range"},
+ LINT_FAIL, "rdfs:range empty", LILV_NS_DOAP"range", NULL},
ret_range_minimum_not_found = {
- LINT_WARN, "lv2:minimum not found", LV2_CORE__minimum},
+ LINT_WARN, "lv2:minimum not found", LV2_CORE__minimum, NULL},
ret_range_minimum_not_an_int = {
- LINT_FAIL, "lv2:minimum not an integer", LV2_CORE__minimum},
+ LINT_FAIL, "lv2:minimum not an integer", LV2_CORE__minimum, NULL},
ret_range_minimum_not_a_float = {
- LINT_FAIL, "lv2:minimum not a float", LV2_CORE__minimum},
+ LINT_FAIL, "lv2:minimum not a float", LV2_CORE__minimum, NULL},
ret_range_maximum_not_found = {
- LINT_WARN, "lv2:maximum not found", LV2_CORE__maximum},
+ LINT_WARN, "lv2:maximum not found", LV2_CORE__maximum, NULL},
ret_range_maximum_not_an_int = {
- LINT_FAIL, "lv2:maximum not an integer", LV2_CORE__maximum},
+ LINT_FAIL, "lv2:maximum not an integer", LV2_CORE__maximum, NULL},
ret_range_maximum_not_a_float = {
- LINT_FAIL, "lv2:maximum not a float", LV2_CORE__maximum},
+ LINT_FAIL, "lv2:maximum not a float", LV2_CORE__maximum, NULL},
ret_range_invalid = {
- LINT_FAIL, "range invalid (min <= max)", LV2_CORE_PREFIX"Parameter"};
+ LINT_FAIL, "range invalid (min <= max)", LV2_CORE_PREFIX"Parameter", NULL};
const ret_t *ret = NULL;
@@ -272,9 +272,9 @@ static const ret_t *
_test_unit(app_t *app)
{
static const ret_t ret_units_unit_not_found = {
- LINT_NOTE, "units:unit not found", LV2_UNITS__unit},
+ LINT_NOTE, "units:unit not found", LV2_UNITS__unit, NULL},
ret_units_unit_not_a_uri_or_object = {
- LINT_FAIL, "units_unit not a URI or object", LV2_UNITS__unit};
+ LINT_FAIL, "units_unit not a URI or object", LV2_UNITS__unit, NULL};
const ret_t *ret = NULL;
diff --git a/lv2lint_plugin.c b/lv2lint_plugin.c
index 73f8ca0..b288014 100644
--- a/lv2lint_plugin.c
+++ b/lv2lint_plugin.c
@@ -29,7 +29,7 @@ static const ret_t *
_test_instantiation(app_t *app)
{
static const ret_t ret_instantiation = {
- LINT_FAIL, "failed to instantiate", LV2_CORE_URI};
+ LINT_FAIL, "failed to instantiate", LV2_CORE_URI, NULL};
const ret_t *ret = NULL;
@@ -46,7 +46,7 @@ static const ret_t *
_test_symbols(app_t *app)
{
static const ret_t ret_symbols = {
- LINT_FAIL, "binary exports superfluous globally visible symbols", LV2_CORE__binary};
+ LINT_FAIL, "binary exports superfluous globally visible symbols", LV2_CORE__binary, NULL};
const ret_t *ret = NULL;
@@ -129,7 +129,7 @@ static const ret_t *
_test_verification(app_t *app)
{
static const ret_t ret_verification = {
- LINT_FAIL, "failed", LV2_CORE_URI};
+ LINT_FAIL, "failed", LV2_CORE_URI, NULL};
const ret_t *ret = NULL;
@@ -145,11 +145,11 @@ static const ret_t *
_test_name(app_t *app)
{
static const ret_t ret_name_not_found = {
- LINT_FAIL, "doap:name not found", LV2_CORE__Plugin},
+ LINT_FAIL, "doap:name not found", LV2_CORE__Plugin, NULL},
ret_name_not_a_string = {
- LINT_FAIL, "doap:name not a string", LILV_NS_DOAP"name"},
+ LINT_FAIL, "doap:name not a string", LILV_NS_DOAP"name", NULL},
ret_name_empty = {
- LINT_FAIL, "doap:name empty", LILV_NS_DOAP"name"};
+ LINT_FAIL, "doap:name empty", LILV_NS_DOAP"name", NULL};
const ret_t *ret = NULL;
@@ -182,13 +182,13 @@ static const ret_t *
_test_license(app_t *app)
{
static const ret_t ret_license_not_found = {
- LINT_WARN, "doap:license not found", LV2_CORE__Plugin},
+ LINT_WARN, "doap:license not found", LV2_CORE__Plugin, NULL},
ret_license_not_a_uri = {
- LINT_FAIL, "doap:license not a URI", LILV_NS_DOAP"license"},
+ LINT_FAIL, "doap:license not a URI", LILV_NS_DOAP"license", NULL},
ret_license_empty = {
- LINT_FAIL, "doap:license empty", LILV_NS_DOAP"license"},
+ LINT_FAIL, "doap:license empty", LILV_NS_DOAP"license", NULL},
ret_license_not_existing = {
- LINT_WARN, "doap:license Web URL does not exist", LILV_NS_DOAP"license"};
+ LINT_WARN, "doap:license Web URL does not exist", LILV_NS_DOAP"license", NULL};
const ret_t *ret = NULL;
@@ -233,11 +233,11 @@ static const ret_t *
_test_author_name(app_t *app)
{
static const ret_t ret_author_not_found = {
- LINT_WARN, "foaf:name not found", LV2_CORE__project},
+ LINT_WARN, "foaf:name not found", LV2_CORE__project, NULL},
ret_author_not_a_string = {
- LINT_FAIL, "foaf:name not an string", LILV_NS_FOAF"name"},
+ LINT_FAIL, "foaf:name not an string", LILV_NS_FOAF"name", NULL},
ret_author_empty = {
- LINT_FAIL, "foaf:name empty", LILV_NS_FOAF"name"};
+ LINT_FAIL, "foaf:name empty", LILV_NS_FOAF"name", NULL};
const ret_t *ret = NULL;
@@ -269,11 +269,11 @@ static const ret_t *
_test_author_email(app_t *app)
{
static const ret_t ret_email_not_found = {
- LINT_WARN, "foaf:email not found", LV2_CORE__project},
+ LINT_WARN, "foaf:email not found", LV2_CORE__project, NULL},
ret_email_not_a_uri = {
- LINT_FAIL, "foaf:email not an URI", LILV_NS_FOAF"email"},
+ LINT_FAIL, "foaf:email not an URI", LILV_NS_FOAF"email", NULL},
ret_email_empty = {
- LINT_FAIL, "foaf:email empty", LILV_NS_FOAF"email"};
+ LINT_FAIL, "foaf:email empty", LILV_NS_FOAF"email", NULL};
const ret_t *ret = NULL;
@@ -305,13 +305,13 @@ static const ret_t *
_test_author_homepage(app_t *app)
{
static const ret_t ret_homepage_not_found = {
- LINT_WARN, "foaf:homepage not found", LV2_CORE__project},
+ LINT_WARN, "foaf:homepage not found", LV2_CORE__project, NULL},
ret_homepage_not_a_uri = {
- LINT_FAIL, "foaf:homepage not an URI", LILV_NS_FOAF"homepage"},
+ LINT_FAIL, "foaf:homepage not an URI", LILV_NS_FOAF"homepage", NULL},
ret_homepage_empty = {
- LINT_FAIL, "foaf:homepage empty", LILV_NS_FOAF"homepage"},
+ LINT_FAIL, "foaf:homepage empty", LILV_NS_FOAF"homepage", NULL},
ret_homepage_not_existing = {
- LINT_WARN, "foaf:homepage Web URL does not exist", LILV_NS_FOAF"homepage"};
+ LINT_WARN, "foaf:homepage Web URL does not exist", LILV_NS_FOAF"homepage", NULL};
const ret_t *ret = NULL;
@@ -356,11 +356,11 @@ static const ret_t *
_test_version_minor(app_t *app)
{
static const ret_t ret_version_minor_not_found = {
- LINT_FAIL, "lv2:minorVersion not found", LV2_CORE__minorVersion},
+ LINT_FAIL, "lv2:minorVersion not found", LV2_CORE__minorVersion, NULL},
ret_version_minor_not_an_int = {
- LINT_FAIL, "lv2:minorVersion not an integer", LV2_CORE__minorVersion},
+ LINT_FAIL, "lv2:minorVersion not an integer", LV2_CORE__minorVersion, NULL},
ret_version_minor_unstable = {
- LINT_NOTE, "lv2:minorVersion denotes an unstable version", LV2_CORE__minorVersion};
+ LINT_NOTE, "lv2:minorVersion denotes an unstable version", LV2_CORE__minorVersion, NULL};
const ret_t *ret = NULL;
@@ -401,11 +401,11 @@ static const ret_t *
_test_version_micro(app_t *app)
{
static const ret_t ret_version_micro_not_found = {
- LINT_FAIL, "lv2:microVersion not found", LV2_CORE__microVersion},
+ LINT_FAIL, "lv2:microVersion not found", LV2_CORE__microVersion, NULL},
ret_version_micro_not_an_int = {
- LINT_FAIL, "lv2:microVersion not an integer", LV2_CORE__microVersion},
+ LINT_FAIL, "lv2:microVersion not an integer", LV2_CORE__microVersion, NULL},
ret_version_micro_unstable = {
- LINT_NOTE, "lv2:microVersion denotes an unstable version", LV2_CORE__microVersion};
+ LINT_NOTE, "lv2:microVersion denotes an unstable version", LV2_CORE__microVersion, NULL};
const ret_t *ret = NULL;
@@ -442,6 +442,7 @@ _test_version_micro(app_t *app)
return ret;
}
+#if 0 //FIXME
static const ret_t *
_test_extension_data(app_t *app)
{
@@ -465,18 +466,19 @@ _test_extension_data(app_t *app)
return ret;
}
+#endif
static const ret_t *
_test_project(app_t *app)
{
static const ret_t ret_project_not_found = {
- LINT_NOTE, "lv2:project not found", LV2_CORE__project},
+ LINT_NOTE, "lv2:project not found", LV2_CORE__project, NULL},
ret_project_name_not_found = {
- LINT_WARN, "lv2:project doap:name not found", LV2_CORE__project},
+ LINT_WARN, "lv2:project doap:name not found", LV2_CORE__project, NULL},
ret_project_name_not_a_string = {
- LINT_FAIL, "lv2:project doap:name not a string", LILV_NS_DOAP"name"},
+ LINT_FAIL, "lv2:project doap:name not a string", LILV_NS_DOAP"name", NULL},
ret_project_name_empty = {
- LINT_FAIL, "lv2:project doap:name empty", LILV_NS_DOAP"name"};
+ LINT_FAIL, "lv2:project doap:name empty", LILV_NS_DOAP"name", NULL};
const ret_t *ret = NULL;
@@ -550,11 +552,11 @@ static const ret_t *
_test_class(app_t *app)
{
static const ret_t ret_class_not_found = {
- LINT_FAIL, "lv2:class not found", LV2_CORE__Plugin},
+ LINT_FAIL, "lv2:class not found", LV2_CORE__Plugin, NULL},
ret_class_is_base_class = {
- LINT_WARN, "lv2:class is base class", LV2_CORE__Plugin},
+ LINT_WARN, "lv2:class is base class", LV2_CORE__Plugin, NULL},
ret_class_not_valid = {
- LINT_FAIL, "lv2:class <%s> not valid", LV2_CORE__Plugin};
+ LINT_FAIL, "lv2:class <%s> not valid", LV2_CORE__Plugin, NULL};
const ret_t *ret = NULL;
@@ -584,7 +586,7 @@ static const ret_t *
_test_features(app_t *app)
{
static const ret_t ret_features_not_valid = {
- LINT_FAIL, "lv2:[optional|required]Feature <%s> not valid", LV2_CORE__Feature};
+ LINT_FAIL, "lv2:[optional|required]Feature <%s> not valid", LV2_CORE__Feature, NULL};
const ret_t *ret = NULL;
@@ -620,7 +622,7 @@ static const ret_t *
_test_extensions(app_t *app)
{
static const ret_t ret_extensions_not_valid = {
- LINT_FAIL, "lv2:extensionData <%s> not valid", LV2_CORE__ExtensionData};
+ LINT_FAIL, "lv2:extensionData <%s> not valid", LV2_CORE__ExtensionData, NULL};
const ret_t *ret = NULL;
@@ -656,17 +658,17 @@ static const ret_t *
_test_worker(app_t *app)
{
static const ret_t ret_worker_schedule_not_found = {
- LINT_FAIL, "work:schedule not defined", LV2_WORKER__schedule},
+ LINT_FAIL, "work:schedule not defined", LV2_WORKER__schedule, NULL},
ret_worker_interface_not_found = {
- LINT_FAIL, "work:interface not defined", LV2_WORKER__interface},
+ LINT_FAIL, "work:interface not defined", LV2_WORKER__interface, NULL},
ret_worker_interface_not_returned = {
- LINT_FAIL, "work:interface not returned by 'extention_data'", LV2_WORKER__interface},
+ LINT_FAIL, "work:interface not returned by 'extention_data'", LV2_WORKER__interface, NULL},
ret_worker_work_not_found = {
- LINT_FAIL, "work:interface has no 'work' function", LV2_WORKER__interface},
+ LINT_FAIL, "work:interface has no 'work' function", LV2_WORKER__interface, NULL},
ret_worker_work_response_not_found = {
- LINT_FAIL, "work:interface has no 'work_response' function", LV2_WORKER__interface},
+ LINT_FAIL, "work:interface has no 'work_response' function", LV2_WORKER__interface, NULL},
ret_worker_end_run_not_found = {
- LINT_NOTE, "work:interface has no 'end_run' function", LV2_WORKER__interface};
+ LINT_NOTE, "work:interface has no 'end_run' function", LV2_WORKER__interface, NULL};
const ret_t *ret = NULL;
@@ -708,13 +710,13 @@ static const ret_t *
_test_options_iface(app_t *app)
{
static const ret_t ret_options_interface_not_found = {
- LINT_FAIL, "opts:interface not defined", LV2_OPTIONS__interface},
+ LINT_FAIL, "opts:interface not defined", LV2_OPTIONS__interface, NULL},
ret_options_interface_not_returned = {
- LINT_FAIL, "opts:interface not returned by 'extention_data'", LV2_OPTIONS__interface},
+ LINT_FAIL, "opts:interface not returned by 'extention_data'", LV2_OPTIONS__interface, NULL},
ret_options_get_not_found = {
- LINT_FAIL, "opts:interface has no 'get' function", LV2_OPTIONS__interface},
+ LINT_FAIL, "opts:interface has no 'get' function", LV2_OPTIONS__interface, NULL},
ret_options_set_not_found = {
- LINT_FAIL, "opts:interface has no 'set' function", LV2_OPTIONS__interface};
+ LINT_FAIL, "opts:interface has no 'set' function", LV2_OPTIONS__interface, NULL};
const ret_t *ret = NULL;
@@ -747,11 +749,11 @@ static const ret_t *
_test_options_feature(app_t *app)
{
static const ret_t ret_options_options_not_found = {
- LINT_FAIL, "opts:options not defined", LV2_OPTIONS__options},
+ LINT_FAIL, "opts:options not defined", LV2_OPTIONS__options, NULL},
ret_options_supported_not_found = {
- LINT_WARN, "opts:{required,supported} options not defined", LV2_OPTIONS__supportedOption},
+ LINT_WARN, "opts:{required,supported} options not defined", LV2_OPTIONS__supportedOption, NULL},
ret_options_required_found = {
- LINT_WARN, "opts:required options defined", LV2_OPTIONS__requiredOption};
+ LINT_WARN, "opts:required options defined", LV2_OPTIONS__requiredOption, NULL};
const ret_t *ret = NULL;
@@ -796,7 +798,7 @@ static const ret_t *
_test_uri_map(app_t *app)
{
static const ret_t ret_uri_map_deprecated = {
- LINT_FAIL, "uri-map is deprecated, use urid:map instead", LV2_URI_MAP_URI};
+ LINT_FAIL, "uri-map is deprecated, use urid:map instead", LV2_URI_MAP_URI, NULL};
const ret_t *ret = NULL;
@@ -812,17 +814,17 @@ static const ret_t *
_test_state(app_t *app)
{
static const ret_t ret_state_load_default_not_found = {
- LINT_FAIL, "state:loadDefaultState not defined", LV2_STATE__loadDefaultState},
+ LINT_FAIL, "state:loadDefaultState not defined", LV2_STATE__loadDefaultState, NULL},
ret_state_interface_not_found = {
- LINT_FAIL, "state:interface not defined", LV2_STATE__interface},
+ LINT_FAIL, "state:interface not defined", LV2_STATE__interface, NULL},
ret_state_state_not_found = {
- LINT_WARN, "state:state not defined", LV2_STATE__state},
+ LINT_WARN, "state:state not defined", LV2_STATE__state, NULL},
ret_state_interface_not_returned = {
- LINT_FAIL, "state:interface not returned by 'extension_data'", LV2_STATE__interface},
+ LINT_FAIL, "state:interface not returned by 'extension_data'", LV2_STATE__interface, NULL},
ret_state_save_not_found = {
- LINT_FAIL, "state:interface has no 'save' function", LV2_STATE__interface},
+ LINT_FAIL, "state:interface has no 'save' function", LV2_STATE__interface, NULL},
ret_state_restore_not_found = {
- LINT_FAIL, "state:interface has no 'restore' function", LV2_STATE__interface};
+ LINT_FAIL, "state:interface has no 'restore' function", LV2_STATE__interface, NULL};
const ret_t *ret = NULL;
@@ -870,11 +872,11 @@ static const ret_t *
_test_comment(app_t *app)
{
static const ret_t ret_comment_not_found = {
- LINT_NOTE, "rdfs:comment or doap:description not found", LV2_CORE__Plugin},
+ LINT_NOTE, "rdfs:comment or doap:description not found", LV2_CORE__Plugin, NULL},
ret_comment_not_a_string = {
- LINT_FAIL, "rdfs:comment not a string", LILV_NS_RDFS"comment"},
+ LINT_FAIL, "rdfs:comment not a string", LILV_NS_RDFS"comment", NULL},
ret_description_not_a_string = {
- LINT_FAIL, "doap:description not a string", LILV_NS_DOAP"description"};
+ LINT_FAIL, "doap:description not a string", LILV_NS_DOAP"description", NULL};
const ret_t *ret = NULL;
@@ -915,9 +917,9 @@ static const ret_t *
_test_shortdesc(app_t *app)
{
static const ret_t ret_shortdesc_not_found = {
- LINT_NOTE, "doap:shortdesc not found", LILV_NS_DOAP"shortdesc"},
+ LINT_NOTE, "doap:shortdesc not found", LILV_NS_DOAP"shortdesc", NULL},
ret_shortdesc_not_a_string = {
- LINT_FAIL, "doap:shortdesc not a string", LILV_NS_DOAP"shortdesc"};
+ LINT_FAIL, "doap:shortdesc not a string", LILV_NS_DOAP"shortdesc", NULL};
const ret_t *ret = NULL;
@@ -944,13 +946,13 @@ static const ret_t *
_test_idisp(app_t *app)
{
static const ret_t ret_idisp_queue_draw_not_found = {
- LINT_FAIL, "idisp:queue_draw not defined", LV2_INLINEDISPLAY__queue_draw},
+ LINT_FAIL, "idisp:queue_draw not defined", LV2_INLINEDISPLAY__queue_draw, NULL},
ret_idisp_interface_not_found = {
- LINT_FAIL, "idisp:interface not defined", LV2_INLINEDISPLAY__interface},
+ LINT_FAIL, "idisp:interface not defined", LV2_INLINEDISPLAY__interface, NULL},
ret_idisp_interface_not_returned = {
- LINT_FAIL, "idisp:interface not returned by 'extention_data'", LV2_INLINEDISPLAY__interface},
+ LINT_FAIL, "idisp:interface not returned by 'extention_data'", LV2_INLINEDISPLAY__interface, NULL},
ret_idisp_render_not_found = {
- LINT_FAIL, "idisp:interface has no 'render' function", LV2_INLINEDISPLAY__interface};
+ LINT_FAIL, "idisp:interface has no 'render' function", LV2_INLINEDISPLAY__interface, NULL};
const ret_t *ret = NULL;
@@ -984,7 +986,7 @@ static const ret_t *
_test_hard_rt_capable(app_t *app)
{
static const ret_t ret_hard_rt_capable_not_found = {
- LINT_WARN, "not advertized as real-time safe", LV2_CORE__hardRTCapable};
+ LINT_WARN, "not advertized as real-time safe", LV2_CORE__hardRTCapable, NULL};
const ret_t *ret = NULL;
@@ -1002,7 +1004,7 @@ static const ret_t *
_test_in_place_broken(app_t *app)
{
static const ret_t ret_in_place_broken_found = {
- LINT_WARN, "cannot process audio/CV in-place", LV2_CORE__inPlaceBroken};
+ LINT_WARN, "cannot process audio/CV in-place", LV2_CORE__inPlaceBroken, NULL};
const ret_t *ret = NULL;
@@ -1020,7 +1022,7 @@ static const ret_t *
_test_is_live(app_t *app)
{
static const ret_t ret_is_live_not_found = {
- LINT_NOTE, "not meant for live usage", LV2_CORE__isLive};
+ LINT_NOTE, "not meant for live usage", LV2_CORE__isLive, NULL};
const ret_t *ret = NULL;
@@ -1038,7 +1040,7 @@ static const ret_t *
_test_fixed_block_length(app_t *app)
{
static const ret_t ret_fixed_block_length_found = {
- LINT_WARN, "requiring a fixed block length is highly discouraged", LV2_BUF_SIZE__fixedBlockLength};
+ LINT_WARN, "requiring a fixed block length is highly discouraged", LV2_BUF_SIZE__fixedBlockLength, NULL};
const ret_t *ret = NULL;
@@ -1057,7 +1059,7 @@ static const ret_t *
_test_power_of_2_block_length(app_t *app)
{
static const ret_t ret_power_of_2_block_length_found = {
- LINT_WARN, "requiring a power of 2 block length is highly discouraged", LV2_BUF_SIZE__powerOf2BlockLength};
+ LINT_WARN, "requiring a power of 2 block length is highly discouraged", LV2_BUF_SIZE__powerOf2BlockLength, NULL};
const ret_t *ret = NULL;
@@ -1077,7 +1079,7 @@ static const ret_t *
_test_plugin_url(app_t *app)
{
static const ret_t ret_plugin_url_not_existing = {
- LINT_WARN, "Plugin Web URL does not exist", LV2_CORE__Plugin};
+ LINT_WARN, "Plugin Web URL does not exist", LV2_CORE__Plugin, NULL};
const ret_t *ret = NULL;
@@ -1101,11 +1103,11 @@ static const ret_t *
_test_patch(app_t *app)
{
static const ret_t ret_patch_no_patch_message_support_on_output = {
- LINT_FAIL, "no patch:Message support on any output", LV2_PATCH__Message},
+ LINT_FAIL, "no patch:Message support on any output", LV2_PATCH__Message, NULL},
ret_patch_no_patch_message_support_on_input = {
- LINT_FAIL, "no patch:Message support on any input", LV2_PATCH__Message},
+ LINT_FAIL, "no patch:Message support on any input", LV2_PATCH__Message, NULL},
ret_patch_no_parameters_found = {
- LINT_WARN, "no patch:writable/readable parameters found", LV2_PATCH__writable};
+ LINT_WARN, "no patch:writable/readable parameters found", LV2_PATCH__writable, NULL};
const ret_t *ret = NULL;
diff --git a/lv2lint_port.c b/lv2lint_port.c
index 67ee18c..077a3c5 100644
--- a/lv2lint_port.c
+++ b/lv2lint_port.c
@@ -28,7 +28,7 @@ static const ret_t *
_test_class(app_t *app)
{
static const ret_t ret_class_not_valid = {
- LINT_FAIL, "lv2:Port class <%s> not valid", LV2_CORE__Port};
+ LINT_FAIL, "lv2:Port class <%s> not valid", LV2_CORE__Port, NULL};
const ret_t *ret = NULL;
@@ -62,7 +62,7 @@ static const ret_t *
_test_properties(app_t *app)
{
static const ret_t ret_properties_not_valid = {
- LINT_FAIL, "lv2:portProperty <%s> not valid", LV2_CORE__portProperty};
+ LINT_FAIL, "lv2:portProperty <%s> not valid", LV2_CORE__portProperty, NULL};
const ret_t *ret = NULL;
@@ -99,13 +99,13 @@ _test_num(LilvNode *node, bool is_integer, bool is_toggled,
float *val)
{
static const ret_t ret_num_not_found = {
- LINT_WARN, "number not found", LV2_CORE__Port},
+ LINT_WARN, "number not found", LV2_CORE__Port, NULL},
ret_num_not_an_int = {
- LINT_WARN, "number not an integer", LV2_CORE__default},
+ LINT_WARN, "number not an integer", LV2_CORE__default, NULL},
ret_num_not_a_float = {
- LINT_WARN, "number no a float", LV2_CORE__default},
+ LINT_WARN, "number no a float", LV2_CORE__default, NULL},
ret_num_not_a_bool = {
- LINT_WARN, "number not a bool", LV2_CORE__default};
+ LINT_WARN, "number not a bool", LV2_CORE__default, NULL};
const ret_t *ret = NULL;
@@ -241,13 +241,10 @@ static const ret_t *
_test_range(app_t *app)
{
static const ret_t ret_range = {
- LINT_FAIL, "range invalid (min <= default <= max)", LV2_CORE__Port};
+ LINT_FAIL, "range invalid (min <= default <= max)", LV2_CORE__Port, NULL};
const ret_t *ret = NULL;
- const bool is_integer = lilv_port_has_property(app->plugin, app->port, app->uris.lv2_integer);
- const bool is_toggled = lilv_port_has_property(app->plugin, app->port, app->uris.lv2_toggled);
-
if( lilv_port_is_a(app->plugin, app->port, app->uris.lv2_ControlPort)
|| lilv_port_is_a(app->plugin, app->port, app->uris.lv2_CVPort) )
{
@@ -264,7 +261,7 @@ static const ret_t *
_test_event_port(app_t *app)
{
static const ret_t ret_event_port_deprecated = {
- LINT_FAIL, "lv2:EventPort is deprecated, use atom:AtomPort instead", LV2_EVENT__EventPort};
+ LINT_FAIL, "lv2:EventPort is deprecated, use atom:AtomPort instead", LV2_EVENT__EventPort, NULL};
const ret_t *ret = NULL;
@@ -280,13 +277,13 @@ static const ret_t *
_test_morph_port(app_t *app)
{
static const ret_t ret_morph_port_not_found = {
- LINT_FAIL, "morph port not found", LV2_MORPH__MorphPort},
+ LINT_FAIL, "morph port not found", LV2_MORPH__MorphPort, NULL},
ret_morph_supported_types_not_found = {
- LINT_FAIL, "supported types for morph port not found", LV2_MORPH__supportsType},
+ LINT_FAIL, "supported types for morph port not found", LV2_MORPH__supportsType, NULL},
ret_morph_supported_types_not_enough = {
- LINT_FAIL, "not enough supported types found", LV2_MORPH__supportsType},
+ LINT_FAIL, "not enough supported types found", LV2_MORPH__supportsType, NULL},
ret_morph_default_not_found = {
- LINT_FAIL, "default port type not found", LV2_MORPH__MorphPort};
+ LINT_FAIL, "default port type not found", LV2_MORPH__MorphPort, NULL};
LilvNodes *morph_supported_types = lilv_port_get(app->plugin, app->port,
app->uris.morph_supportsType);
@@ -340,9 +337,9 @@ static const ret_t *
_test_comment(app_t *app)
{
static const ret_t ret_comment_not_found = {
- LINT_NOTE, "rdfs:comment not found", LILV_NS_RDFS"comment"},
+ LINT_NOTE, "rdfs:comment not found", LILV_NS_RDFS"comment", NULL},
ret_comment_not_a_string = {
- LINT_FAIL, "rdfs:comment not a string", LILV_NS_RDFS"comment"};
+ LINT_FAIL, "rdfs:comment not a string", LILV_NS_RDFS"comment", NULL};
const ret_t *ret = NULL;
@@ -368,9 +365,9 @@ static const ret_t *
_test_group(app_t *app)
{
static const ret_t ret_group_not_found = {
- LINT_NOTE, "pg:group not found", LV2_PORT_GROUPS__group},
+ LINT_NOTE, "pg:group not found", LV2_PORT_GROUPS__group, NULL},
ret_group_not_a_uri = {
- LINT_FAIL, "pg:group not a URI", LV2_PORT_GROUPS__group};
+ LINT_FAIL, "pg:group not a URI", LV2_PORT_GROUPS__group, NULL};
const ret_t *ret = NULL;
@@ -396,9 +393,9 @@ static const ret_t *
_test_unit(app_t *app)
{
static const ret_t ret_units_unit_not_found = {
- LINT_NOTE, "units:unit not found", LV2_UNITS__unit},
+ LINT_NOTE, "units:unit not found", LV2_UNITS__unit, NULL},
ret_units_unit_not_a_uri_or_object = {
- LINT_FAIL, "units_unit not a URI or object", LV2_UNITS__unit};
+ LINT_FAIL, "units_unit not a URI or object", LV2_UNITS__unit, NULL};
const ret_t *ret = NULL;
diff --git a/lv2lint_ui.c b/lv2lint_ui.c
index bdc3d73..46a0951 100644
--- a/lv2lint_ui.c
+++ b/lv2lint_ui.c
@@ -75,7 +75,7 @@ static const ret_t *
_test_instance_access(app_t *app)
{
static const ret_t ret_instance_access_discouraged = {
- LINT_WARN, "usage of instance-access is highly discouraged", LV2_INSTANCE_ACCESS_URI};
+ LINT_WARN, "usage of instance-access is highly discouraged", LV2_INSTANCE_ACCESS_URI, NULL};
const ret_t *ret = NULL;
@@ -96,7 +96,7 @@ static const ret_t *
_test_data_access(app_t *app)
{
static const ret_t ret_data_access_discouraged = {
- LINT_WARN, "usage of data-access is highly discouraged", LV2_DATA_ACCESS_URI};
+ LINT_WARN, "usage of data-access is highly discouraged", LV2_DATA_ACCESS_URI, NULL};
const ret_t *ret = NULL;
@@ -117,7 +117,7 @@ static const ret_t *
_test_mixed(app_t *app)
{
static const ret_t ret_mixed_discouraged = {
- LINT_WARN, "mixing DSP and UI code in same binary is discouraged", LV2_UI_PREFIX};
+ LINT_WARN, "mixing DSP and UI code in same binary is discouraged", LV2_UI_PREFIX, NULL};
const ret_t *ret = NULL;
@@ -132,11 +132,12 @@ _test_mixed(app_t *app)
return ret;
}
+#if 0 //FIXME
static const ret_t *
_test_binary(app_t *app)
{
static const ret_t ret_binary_deprecated = {
- LINT_FAIL, "ui:binary is deprecated, use lv2:binary instead", LV2_UI__binary};
+ LINT_FAIL, "ui:binary is deprecated, use lv2:binary instead", LV2_UI__binary, NULL};
const ret_t *ret = NULL;
@@ -150,12 +151,13 @@ _test_binary(app_t *app)
return ret;
}
+#endif
static const ret_t *
_test_resident(app_t *app)
{
static const ret_t ret_resident_deprecated = {
- LINT_FAIL, "ui:makeSONameResident is deprecated", LV2_UI_PREFIX"makeSONameResident"};
+ LINT_FAIL, "ui:makeSONameResident is deprecated", LV2_UI_PREFIX"makeSONameResident", NULL};
const ret_t *ret = NULL;
@@ -174,11 +176,11 @@ static const ret_t *
_test_idle_interface(app_t *app)
{
static const ret_t ret_idle_feature_missing = {
- LINT_WARN, "lv2:feature ui:idleInterface missing", LV2_UI__idleInterface},
+ LINT_WARN, "lv2:feature ui:idleInterface missing", LV2_UI__idleInterface, NULL},
ret_idle_extension_missing = {
- LINT_FAIL, "lv2:extensionData ui:idleInterface missing", LV2_UI__idleInterface},
+ LINT_FAIL, "lv2:extensionData ui:idleInterface missing", LV2_UI__idleInterface, NULL},
ret_idle_extension_not_returned = {
- LINT_FAIL, "ui:idleInterface not returned by 'extention_data'", LV2_UI__idleInterface};
+ LINT_FAIL, "ui:idleInterface not returned by 'extention_data'", LV2_UI__idleInterface, NULL};
const ret_t *ret = NULL;
@@ -209,9 +211,9 @@ static const ret_t *
_test_show_interface(app_t *app)
{
static const ret_t ret_show_extension_missing = {
- LINT_FAIL, "lv2:extensionData ui:showInterface missing", LV2_UI__showInterface},
+ LINT_FAIL, "lv2:extensionData ui:showInterface missing", LV2_UI__showInterface, NULL},
ret_show_extension_not_returned = {
- LINT_FAIL, "ui:showInterface not returned by 'extention_data'", LV2_UI__showInterface};
+ LINT_FAIL, "ui:showInterface not returned by 'extention_data'", LV2_UI__showInterface, NULL};
const ret_t *ret = NULL;
@@ -234,9 +236,9 @@ static const ret_t *
_test_resize_interface(app_t *app)
{
static const ret_t ret_resize_missing = {
- LINT_FAIL, "lv2:extensionData ui:resize missing", LV2_UI__resize},
+ LINT_FAIL, "lv2:extensionData ui:resize missing", LV2_UI__resize, NULL},
ret_resize_not_returned = {
- LINT_FAIL, "ui:resize not returned by 'extention_data'", LV2_UI__resize};
+ LINT_FAIL, "ui:resize not returned by 'extention_data'", LV2_UI__resize, NULL};
const ret_t *ret = NULL;
@@ -259,15 +261,15 @@ static const ret_t *
_test_toolkit(app_t *app)
{
static const ret_t ret_toolkit_invalid = {
- LINT_FAIL, "UI toolkit not given", LV2_UI__ui},
+ LINT_FAIL, "UI toolkit not given", LV2_UI__ui, NULL},
ret_toolkit_show_interface = {
- LINT_WARN, "usage of external UI is discouraged", LV2_UI__showInterface},
+ LINT_WARN, "usage of external UI is discouraged", LV2_UI__showInterface, NULL},
ret_toolkit_external = {
- LINT_WARN, "usage of external UI is discouraged", LV2_EXTERNAL_UI__Widget},
+ LINT_WARN, "usage of external UI is discouraged", LV2_EXTERNAL_UI__Widget, NULL},
ret_toolkit_unknown = {
- LINT_FAIL, "UI toolkit <%s> unkown", LV2_UI__ui},
+ LINT_FAIL, "UI toolkit <%s> unkown", LV2_UI__ui, NULL},
ret_toolkit_non_native = {
- LINT_WARN, "usage of non-native toolkit <%s> is dicouraged", LV2_UI__ui};
+ LINT_WARN, "usage of non-native toolkit <%s> is dicouraged", LV2_UI__ui, NULL};
const ret_t *ret = NULL;
@@ -275,9 +277,13 @@ _test_toolkit(app_t *app)
LilvNode *ui_class_node = lilv_world_get(app->world, ui_uri_node, app->uris.rdf_type, NULL);
LilvNodes *ui_class_nodes = lilv_world_find_nodes(app->world, NULL, app->uris.rdfs_subClassOf, app->uris.ui_UI);
- const bool is_x11_ui = lilv_ui_is_a(app->ui, app->uris.ui_X11UI);
+#if defined(_WIN32)
const bool is_windows_ui = lilv_ui_is_a(app->ui, app->uris.ui_WindowsUI);
+#elif defined(__APPLE__)
const bool is_cocoa_ui = lilv_ui_is_a(app->ui, app->uris.ui_CocoaUI);
+#else
+ const bool is_x11_ui = lilv_ui_is_a(app->ui, app->uris.ui_X11UI);
+#endif
const bool has_show_extension = lilv_world_ask(app->world,
lilv_ui_get_uri(app->ui), app->uris.lv2_extensionData, app->uris.ui_showInterface);
@@ -333,7 +339,7 @@ static const ret_t *
_test_ui_url(app_t *app)
{
static const ret_t ret_ui_url_not_existing = {
- LINT_WARN, "UI Web URL does not exist", LV2_UI__UI};
+ LINT_WARN, "UI Web URL does not exist", LV2_UI__UI, NULL};
const ret_t *ret = NULL;
@@ -402,11 +408,16 @@ test_ui(app_t *app)
}
// Get discovery function
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
#ifdef _WIN32
+ void *func_ptr =
LV2UI_DescriptorFunction df = GetProcAddress(lib, "lv2ui_descriptor");
#else
+ //LV2UI_DescriptorFunction df = (LV2UI_DescriptorFunction)dlsym(lib, "lv2ui_descriptor");
LV2UI_DescriptorFunction df = (LV2UI_DescriptorFunction)dlsym(lib, "lv2ui_descriptor");
#endif
+#pragma GCC diagnostic pop
if(!df)
{
fprintf(stderr, "Broken LV2 UI %s (no lv2ui_descriptor symbol found)\n", ui_binary_path);
diff --git a/meson.build b/meson.build
index cc707cb..12c1e85 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,7 @@
project('lv2lint', 'c', default_options : [
'buildtype=release',
- 'warning_level=1',
+ 'warning_level=3',
+ 'werror=true',
'b_lto=true',
'c_std=c11'])