From 67aec56f8c276cef9e1809404be2141d865bfe96 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 17 Oct 2020 09:49:39 +0200 Subject: [PATCH] filter: make filter_preset_table an opaque struct for C code filter_preset_table_t was defined as "void" for C code. However, that meant that any pointer could be passed as such a table and such a table could be passed as any pointer, without generating compiler warnings. Indeed, we had a parameter-mixup that went unnoticed. Therefore, make filter_preset_t an anonymous structure with the name filter_preset instead. Signed-off-by: Berthold Stoeger --- core/filterpreset.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/filterpreset.h b/core/filterpreset.h index d10f1a06e..86bf30221 100644 --- a/core/filterpreset.h +++ b/core/filterpreset.h @@ -28,7 +28,8 @@ using filter_preset_table_t = std::vector; extern filter_preset_table_t filter_preset_table; #else struct filter_preset; -typedef void filter_preset_table_t; +struct filter_preset_table; +typedef struct filter_preset_table filter_preset_table_t; #endif