summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-17 09:49:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-17 09:04:20 -0700
commit67aec56f8c276cef9e1809404be2141d865bfe96 (patch)
tree24aea71a1adb90ad33003463e8259525cf5e8b77 /core
parent3d7b2a2d7cd9999c595020d23a94f972f1e8147d (diff)
downloadsubsurface-67aec56f8c276cef9e1809404be2141d865bfe96.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/filterpreset.h3
1 files changed, 2 insertions, 1 deletions
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<filter_preset>;
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