Since the switch to LLVM 13, there are a number of compiler warnings
in base about variables that are assigned to but never used. Let's
start picking the low-hanging fruit, ok?
lib/libfuse: fix -Wunused-but-set-variable warning
M lib/libfuse/fuse_opt.c
diff 926818cffbbacfeb5685fa0f8e104986608d1a29
ce1a8a9dca08dd7e01f71dfff05f1e4f4ed3bb7e
blob - 38bf34a7d157a543ee47f18bf350cb9183ab9803
blob + 26dcecd3e2486ad1f833bfee0827a2bd5406e068
--- lib/libfuse/fuse_opt.c
+++ lib/libfuse/fuse_opt.c
@@ -190,10 +190,9 @@ parse_opt(const struct fuse_opt *o, const char *opt, v
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, v
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);
--
Christian "naddy" Weisgerber [email protected]