aboutsummaryrefslogtreecommitdiffstats
path: root/src/wavedata.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-02-12 18:08:31 +0100
committerDavid Robillard <d@drobilla.net>2017-02-12 18:08:47 +0100
commit7539343e2940e37cbf45a859645889c703266942 (patch)
treeddac3dd44c66995aecb5215d1bb5fa44e2bfc8e9 /src/wavedata.c
parent663ce39a220d1508a8803d711306c67146c983e9 (diff)
downloadblop.lv2-7539343e2940e37cbf45a859645889c703266942.tar.gz
blop.lv2-7539343e2940e37cbf45a859645889c703266942.tar.bz2
blop.lv2-7539343e2940e37cbf45a859645889c703266942.zip
Avoid pedantic dlsym warnings
Diffstat (limited to 'src/wavedata.c')
-rw-r--r--src/wavedata.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wavedata.c b/src/wavedata.c
index 8ec3783..910577f 100644
--- a/src/wavedata.c
+++ b/src/wavedata.c
@@ -55,8 +55,13 @@ wavedata_load(Wavedata* w,
free(lib_path);
if (handle) {
+ // Avoid pedantic warnings about fetching functions with dlsym
+ typedef void (*VoidFunc)(void);
+ typedef VoidFunc (*VoidFuncGetter)(void*, const char*);
+ VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym;
+
typedef int (*DescFunc)(Wavedata*, unsigned long);
- DescFunc desc_func = (DescFunc)dlsym(handle, wdat_descriptor_name);
+ DescFunc desc_func = (DescFunc)dlfunc(handle, wdat_descriptor_name);
if (desc_func) {
retval = desc_func(w, (unsigned long)sample_rate);
w->data_handle = handle;