From: naddy Date: Sun, 16 Jan 2022 20:06:18 +0000 (+0000) Subject: libfuse: fix -Wunused-but-set-variable warning X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3c787698cf534aa28878c487d517954430d81e85;p=openbsd libfuse: fix -Wunused-but-set-variable warning ok tb@ --- diff --git a/lib/libfuse/fuse_opt.c b/lib/libfuse/fuse_opt.c index 38bf34a7d15..fa6e5b849d4 100644 --- a/lib/libfuse/fuse_opt.c +++ b/lib/libfuse/fuse_opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_opt.c,v 1.26 2018/05/15 11:57:32 helg Exp $ */ +/* $OpenBSD: fuse_opt.c,v 1.27 2022/01/16 20:06:18 naddy Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * Copyright (c) 2013 Stefan Sperling @@ -190,10 +190,9 @@ parse_opt(const struct fuse_opt *o, const char *opt, void *data, fuse_opt_proc_t f, struct fuse_args *arg) { const char *val; - int keyval, ret, found; + int ret, found; size_t sep; - keyval = 0; found = 0; for(; o != NULL && o->templ; o++) { @@ -205,11 +204,9 @@ parse_opt(const struct fuse_opt *o, const char *opt, void *data, val = opt; /* check key=value or -p n */ - if (o->templ[sep] == '=') { - keyval = 1; + if (o->templ[sep] == '=') val = &opt[sep + 1]; - } else if (o->templ[sep] == ' ') { - keyval = 1; + else if (o->templ[sep] == ' ') { if (sep == strlen(opt)) { /* ask for next arg to be included */ return (IFUSE_OPT_NEED_ANOTHER_ARG);