summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/.clang-tidy1
-rw-r--r--tools/lv2apply.c2
-rw-r--r--tools/lv2bench.c10
3 files changed, 9 insertions, 4 deletions
diff --git a/tools/.clang-tidy b/tools/.clang-tidy
index d8434e2..406be48 100644
--- a/tools/.clang-tidy
+++ b/tools/.clang-tidy
@@ -6,7 +6,6 @@ Checks: >
-android-cloexec-fopen,
-bugprone-narrowing-conversions,
-cert-err33-c,
- -cert-err34-c,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-narrowing-conversions,
-hicpp-signed-bitwise,
diff --git a/tools/lv2apply.c b/tools/lv2apply.c
index 8fd3753..0792eed 100644
--- a/tools/lv2apply.c
+++ b/tools/lv2apply.c
@@ -243,7 +243,7 @@ main(int argc, char** argv)
self.params =
(Param*)realloc(self.params, ++self.n_params * sizeof(Param));
self.params[self.n_params - 1].sym = argv[++i];
- self.params[self.n_params - 1].value = atof(argv[++i]);
+ self.params[self.n_params - 1].value = strtof(argv[++i], NULL);
} else if (argv[i][0] == '-') {
free(self.params);
return print_usage(1);
diff --git a/tools/lv2bench.c b/tools/lv2bench.c
index b19d376..fab7ec2 100644
--- a/tools/lv2bench.c
+++ b/tools/lv2bench.c
@@ -214,9 +214,15 @@ main(int argc, char** argv)
if (!strcmp(argv[a], "-f")) {
full_output = true;
} else if (!strcmp(argv[a], "-n") && (a + 1 < argc)) {
- sample_count = atoi(argv[++a]);
+ const long l = strtol(argv[++a], NULL, 10);
+ if (l > 0 && l < (1L << 28L)) {
+ sample_count = (uint32_t)l;
+ }
} else if (!strcmp(argv[a], "-b") && (a + 1 < argc)) {
- block_size = atoi(argv[++a]);
+ const long l = strtol(argv[++a], NULL, 10);
+ if (l > 0 && l < 16384) {
+ block_size = (uint32_t)l;
+ }
} else if (argv[a][0] != '-') {
break;
} else {