diff options
author | David Robillard <d@drobilla.net> | 2017-02-12 18:08:31 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-12 18:08:47 +0100 |
commit | 7539343e2940e37cbf45a859645889c703266942 (patch) | |
tree | ddac3dd44c66995aecb5215d1bb5fa44e2bfc8e9 | |
parent | 663ce39a220d1508a8803d711306c67146c983e9 (diff) | |
download | blop.lv2-7539343e2940e37cbf45a859645889c703266942.tar.gz blop.lv2-7539343e2940e37cbf45a859645889c703266942.tar.bz2 blop.lv2-7539343e2940e37cbf45a859645889c703266942.zip |
Avoid pedantic dlsym warnings
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/wavedata.c | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -3,8 +3,9 @@ blop-lv2 (1.0.1) unstable; * Add missing properties for options interface * Fix compilation with default hidden visibility * Set Hz unit on frequency ports + * Avoid pedantic warnings - -- David Robillard <d@drobilla.net> Sat, 25 Jul 2015 11:57:15 -0400 + -- David Robillard <d@drobilla.net> Sun, 12 Feb 2017 18:07:57 +0100 blop-lv2 (1.0.0) stable; 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; |