From ed5fd2d3982bc10d91c2abe8468d5ca51abdffe8 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 2 Aug 2012 11:25:51 +0200 Subject: [PATCH] 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. --- src/nfs.c | 3 ++- src/zfs_arc.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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); -- 2.11.0