aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_opt.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-04 12:33:17 -0700
committerNikolaus Rath <Nikolaus@rath.org>2019-06-06 13:31:41 +0100
commit63c11456d48b156b33b8b16cd47759c0d406f5b9 (patch)
tree3bc8b85554865ab7d33ddf743c8e4571636ff9fb /lib/fuse_opt.c
parenta6024d4bf8868b88eb516d7322e5739742a9c688 (diff)
downloadlibfuse-63c11456d48b156b33b8b16cd47759c0d406f5b9.tar.gz
Avoid pointer arithmetic with `void *`
The pointer operand to the binary `+` operator must be to a complete object type. Since we are working with byte sizes, use `char *` instead.
Diffstat (limited to 'lib/fuse_opt.c')
-rw-r--r--lib/fuse_opt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fuse_opt.c b/lib/fuse_opt.c
index 3d4a3dd..f6cae4f 100644
--- a/lib/fuse_opt.c
+++ b/lib/fuse_opt.c
@@ -232,7 +232,7 @@ static int process_opt(struct fuse_opt_context *ctx,
if (call_proc(ctx, arg, opt->value, iso) == -1)
return -1;
} else {
- void *var = ctx->data + opt->offset;
+ void *var = (char *)ctx->data + opt->offset;
if (sep && opt->templ[sep + 1]) {
const char *param = arg + sep;
if (opt->templ[sep] == '=')