From 777d395feaa082a69e32d985bbc1cca3d3dad077 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Wed, 21 Nov 2012 14:07:05 +0530 Subject: core: fixes for gcc's '-pedantic' flag build * warnings on 'void *' arguments * warnings on empty initializations * warnings on empty array (array[0]) Change-Id: Iae440f54cbd59580eb69f3ecaed5a9926c0edf95 BUG: 875913 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/4219 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/xlator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libglusterfs/src/xlator.c') diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index b42bc3bcc83..22c81f81b88 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -218,19 +218,19 @@ xlator_dynload (xlator_t *xl) goto out; } - if (!(xl->init = dlsym (handle, "init"))) { + if (!(*VOID(&xl->init) = dlsym (handle, "init"))) { gf_log ("xlator", GF_LOG_WARNING, "dlsym(init) on %s", dlerror ()); goto out; } - if (!(xl->fini = dlsym (handle, "fini"))) { + if (!(*VOID(&(xl->fini)) = dlsym (handle, "fini"))) { gf_log ("xlator", GF_LOG_WARNING, "dlsym(fini) on %s", dlerror ()); goto out; } - if (!(xl->notify = dlsym (handle, "notify"))) { + if (!(*VOID(&(xl->notify)) = dlsym (handle, "notify"))) { gf_log ("xlator", GF_LOG_TRACE, "dlsym(notify) on %s -- neglecting", dlerror ()); } @@ -240,13 +240,13 @@ xlator_dynload (xlator_t *xl) "dlsym(dumpops) on %s -- neglecting", dlerror ()); } - if (!(xl->mem_acct_init = dlsym (handle, "mem_acct_init"))) { + if (!(*VOID(&(xl->mem_acct_init)) = dlsym (handle, "mem_acct_init"))) { gf_log (xl->name, GF_LOG_TRACE, "dlsym(mem_acct_init) on %s -- neglecting", dlerror ()); } - if (!(xl->reconfigure = dlsym (handle, "reconfigure"))) { + if (!(*VOID(&(xl->reconfigure)) = dlsym (handle, "reconfigure"))) { gf_log ("xlator", GF_LOG_TRACE, "dlsym(reconfigure) on %s -- neglecting", dlerror()); -- cgit