aboutsummaryrefslogtreecommitdiffstats
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
parent663ce39a220d1508a8803d711306c67146c983e9 (diff)
downloadblop.lv2-7539343e2940e37cbf45a859645889c703266942.tar.gz
blop.lv2-7539343e2940e37cbf45a859645889c703266942.tar.bz2
blop.lv2-7539343e2940e37cbf45a859645889c703266942.zip
Avoid pedantic dlsym warnings
-rw-r--r--NEWS3
-rw-r--r--src/wavedata.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e62b0a3..583efcf 100644
--- a/NEWS
+++ b/NEWS
@@ -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;