diff options
-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; |