diff options
-rw-r--r-- | .clang-tidy | 6 | ||||
-rw-r--r-- | include/lilv/lilvmm.hpp | 17 | ||||
-rw-r--r-- | test/.clang-tidy | 5 | ||||
-rw-r--r-- | utils/lv2bench.c | 2 |
4 files changed, 20 insertions, 10 deletions
diff --git a/.clang-tidy b/.clang-tidy index 9accc2c..67171a8 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,8 +2,10 @@ Checks: > *, -*-magic-numbers, -*-uppercase-literal-suffix, + -altera-*, -android-cloexec-fopen, -bugprone-branch-clone, + -bugprone-easily-swappable-parameters, -bugprone-macro-parentheses, -bugprone-narrowing-conversions, -bugprone-not-null-terminated-result, @@ -14,6 +16,7 @@ Checks: > -cert-err34-c, -clang-analyzer-alpha.*, -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling, + -concurrency-mt-unsafe, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-macro-usage, -cppcoreguidelines-narrowing-conversions, @@ -26,7 +29,10 @@ Checks: > -misc-non-private-member-variables-in-classes, -misc-unused-parameters, -modernize-use-trailing-return-type, + -performance-no-int-to-ptr, + -readability-function-cognitive-complexity, -readability-implicit-bool-conversion, + -readability-suspicious-call-argument, WarningsAsErrors: '*' HeaderFilterRegex: '.*' FormatStyle: file diff --git a/include/lilv/lilvmm.hpp b/include/lilv/lilvmm.hpp index 0ac802d..0070246 100644 --- a/include/lilv/lilvmm.hpp +++ b/include/lilv/lilvmm.hpp @@ -337,16 +337,15 @@ struct Instance { LILV_DEPRECATED inline Instance(Plugin plugin, double sample_rate) - { - me = lilv_plugin_instantiate(plugin, sample_rate, nullptr); - } + : me(lilv_plugin_instantiate(plugin, sample_rate, nullptr)) + {} - LILV_DEPRECATED inline Instance(Plugin plugin, - double sample_rate, - LV2_Feature* const* features) - { - me = lilv_plugin_instantiate(plugin, sample_rate, features); - } + LILV_DEPRECATED + inline Instance(Plugin plugin, + double sample_rate, + LV2_Feature* const* features) + : me(lilv_plugin_instantiate(plugin, sample_rate, features)) + {} static inline Instance* create(Plugin plugin, double sample_rate, diff --git a/test/.clang-tidy b/test/.clang-tidy index a6f6844..ff80138 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -4,9 +4,11 @@ Checks: > -*-magic-numbers, -*-uppercase-literal-suffix, -*-vararg, + -altera-*, -android-cloexec-fopen, -bugprone-assert-side-effect, -bugprone-branch-clone, + -bugprone-easily-swappable-parameters, -bugprone-macro-parentheses, -bugprone-narrowing-conversions, -bugprone-not-null-terminated-result, @@ -18,6 +20,7 @@ Checks: > -cert-err34-c, -clang-analyzer-alpha.*, -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling, + -concurrency-mt-unsafe, -cppcoreguidelines-avoid-non-const-global-variables, -cppcoreguidelines-macro-usage, -cppcoreguidelines-narrowing-conversions, @@ -36,7 +39,9 @@ Checks: > -misc-unused-parameters, -modernize-return-braced-init-list, -modernize-use-trailing-return-type, + -readability-function-cognitive-complexity, -readability-implicit-bool-conversion, + -readability-suspicious-call-argument, WarningsAsErrors: '*' HeaderFilterRegex: '.*' FormatStyle: file diff --git a/utils/lv2bench.c b/utils/lv2bench.c index c355727..26f52d1 100644 --- a/utils/lv2bench.c +++ b/utils/lv2bench.c @@ -79,7 +79,7 @@ bench(const LilvPlugin* p, uint32_t sample_count, uint32_t block_size) LV2_Feature unmap_feature = {LV2_URID_UNMAP_URI, &unmap}; const LV2_Feature* features[] = {&map_feature, &unmap_feature, NULL}; - float* const buf = (float*)calloc(block_size * 2, sizeof(float)); + float* const buf = (float*)calloc(block_size * 2ul, sizeof(float)); float* const in = buf; float* const out = buf + block_size; if (!buf) { |