summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.suppress.cppcheck1
-rw-r--r--tools/lv2bench.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/.suppress.cppcheck b/.suppress.cppcheck
index 1091659..8536be5 100644
--- a/.suppress.cppcheck
+++ b/.suppress.cppcheck
@@ -5,7 +5,6 @@ knownConditionTrueFalse
memleakOnRealloc
noExplicitConstructor
normalCheckLevelMaxBranches
-nullPointerArithmeticRedundantCheck
redundantInitialization
unusedStructMember
varFuncNullUB
diff --git a/tools/lv2bench.c b/tools/lv2bench.c
index 4b7eef7..aeb86a0 100644
--- a/tools/lv2bench.c
+++ b/tools/lv2bench.c
@@ -65,13 +65,14 @@ bench(const LilvPlugin* p, uint32_t sample_count, uint32_t block_size)
const LV2_Feature* features[] = {&map_feature, &unmap_feature, NULL};
float* const buf = (float*)calloc(block_size * 2UL, sizeof(float));
- float* const in = buf;
- float* const out = buf + block_size;
if (!buf) {
fprintf(stderr, "Out of memory\n");
return 0.0;
}
+ float* const in = buf;
+ float* const out = buf + block_size;
+
const size_t atom_capacity = 1024;
LV2_Atom_Sequence seq_in = {{sizeof(LV2_Atom_Sequence_Body),