From: Sebastian Harl Date: Thu, 2 Aug 2012 09:25:51 +0000 (+0200) Subject: nfs, zfs_arc plugins: Fixed discards qualifiers from pointer target type warn. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ed5fd2d3982bc10d91c2abe8468d5ca51abdffe8;p=collectd.git nfs, zfs_arc plugins: Fixed discards qualifiers from pointer target type warn. kstat_data_lookup() and get_kstat_value() expect char pointers rather than const char pointers. --- diff --git a/src/nfs.c b/src/nfs.c index 58f2e0d2..5f7c3085 100644 --- a/src/nfs.c +++ b/src/nfs.c @@ -332,7 +332,8 @@ static int nfs_read_kstat (kstat_t *ksp, int nfs_version, char *inst, kstat_read(kc, ksp, NULL); for (i = 0; i < proc_names_num; i++) - values[i].counter = (derive_t) get_kstat_value (ksp, proc_names[i]); + values[i].counter = (derive_t) get_kstat_value (ksp, + (char *)proc_names[i]); nfs_procedures_submit (plugin_instance, proc_names, values, proc_names_num); diff --git a/src/zfs_arc.c b/src/zfs_arc.c index e77569f5..dd120409 100644 --- a/src/zfs_arc.c +++ b/src/zfs_arc.c @@ -60,7 +60,7 @@ static int za_read_derive (kstat_t *ksp, const char *kstat_value, long long tmp; value_t v; - tmp = get_kstat_value (ksp, kstat_value); + tmp = get_kstat_value (ksp, (char *)kstat_value); if (tmp == -1LL) { ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_value); @@ -77,7 +77,7 @@ static int za_read_gauge (kstat_t *ksp, const char *kstat_value, long long tmp; value_t v; - tmp = get_kstat_value (ksp, kstat_value); + tmp = get_kstat_value (ksp, (char *)kstat_value); if (tmp == -1LL) { ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_value);