From 63c11456d48b156b33b8b16cd47759c0d406f5b9 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 4 Jun 2019 12:33:17 -0700 Subject: 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. --- lib/fuse_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/fuse_opt.c') 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] == '=') -- cgit v1.2.3