Skip to contentSkip to conversation

libfuse: fix cppcheck warnings in the new mount service code

PATCH New Darrick J. Wong 1 participant 1 message May 19

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libfuse: fix cppcheck warnings in the new mount service code

From: Darrick J. Wong <[email protected]>

Fix some cppcheck warnings. No functional changes.

---
Hopefully this clears up the last of the static checker errors with the fuse service container branch?

---
 util/mount_service.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
util/mount_service.c +3 -2
index afb345e8b91dfc..8b0eecf5b00ab2 100644
@@ -882,7 +882,7 @@ static int mount_service_handle_source_cmd(struct mount_service *mo,
 					   const struct fuse_service_packet *p,
 					   size_t psz)
 {
-	struct fuse_service_string_command *oc =
+	const struct fuse_service_string_command *oc =
 			container_of(p, struct fuse_service_string_command, p);
 	char *source;
 
@@ -935,7 +935,8 @@ static int mount_service_handle_mntopts_cmd(struct mount_service *mo,
 	struct fuse_service_string_command *oc =
 			container_of(p, struct fuse_service_string_command, p);
 	char *tokstr = oc->value;
-	char *tok, *savetok;
+	const char *tok;
+	char *savetok;
 	char *mntopts;
 
 	if (psz < sizeof_fuse_service_string_command(1)) {