From: "Darrick J. Wong" <djwong@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 7/7] fuse2fs: fix uninitialized variable warnings
Date: Mon, 4 May 2026 17:26:50 -0700 [thread overview]
Message-ID: <20260505002650.GH1101423@frogsfrogsfrogs> (raw)
In-Reply-To: <20260504233301.2345652-8-tytso@mit.edu>
On Mon, May 04, 2026 at 07:33:01PM -0400, Theodore Ts'o wrote:
> Clang treats use of unitialized variables found by static analysis to
> be serious enough that it will emit them by default (even without
> -Wall). So let's fix them up.
>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
I wonder why gcc doesn't complain about this??
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fuse4fs/fuse4fs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c
> index b883083f8..928473268 100644
> --- a/fuse4fs/fuse4fs.c
> +++ b/fuse4fs/fuse4fs.c
> @@ -2216,7 +2216,7 @@ static void op_mknod(fuse_req_t req, fuse_ino_t fino, const char *name,
> const struct fuse_ctx *ctxt = fuse_req_ctx(req);
> struct fuse4fs *ff = fuse4fs_get(req);
> ext2_filsys fs;
> - ext2_ino_t parent, child;
> + ext2_ino_t parent, child = 0;
> errcode_t err;
> int filetype;
> gid_t gid;
> @@ -2311,7 +2311,7 @@ static void op_mkdir(fuse_req_t req, fuse_ino_t fino, const char *name,
> const struct fuse_ctx *ctxt = fuse_req_ctx(req);
> struct fuse4fs *ff = fuse4fs_get(req);
> ext2_filsys fs;
> - ext2_ino_t parent, child;
> + ext2_ino_t parent, child = 0;
> errcode_t err;
> char *block;
> blk64_t blk;
> @@ -2990,7 +2990,7 @@ static void op_symlink(fuse_req_t req, const char *target, fuse_ino_t fino,
> const struct fuse_ctx *ctxt = fuse_req_ctx(req);
> struct fuse4fs *ff = fuse4fs_get(req);
> ext2_filsys fs;
> - ext2_ino_t parent, child;
> + ext2_ino_t parent, child = 0;
> errcode_t err;
> gid_t gid;
> int ret = 0;
> @@ -6042,7 +6042,7 @@ static int fuse4fs_main(struct fuse_args *args, struct fuse4fs *ff)
> struct fuse_cmdline_opts opts;
> struct fuse_session *se;
> struct fuse_loop_config *loop_config = NULL;
> - int ret;
> + int ret = 0;
>
> if (fuse_parse_cmdline(args, &opts) != 0) {
> ret = 1;
> --
> 2.53.0
>
>
next prev parent reply other threads:[~2026-05-05 0:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 23:32 [PATCH 0/7] fix up issues from djwong/fuse4fs-fork Theodore Ts'o
2026-05-04 23:32 ` [PATCH 1/7] libsupport: drop xbitops.h and define fls() if necessary Theodore Ts'o
2026-05-05 0:11 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 2/7] configure.ac: fix disable fuse2fs/fuse4fs by default path Theodore Ts'o
2026-05-05 0:13 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 3/7] libsupport: don't use bzero in cache.c Theodore Ts'o
2026-05-05 0:15 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 4/7] fuse[24]fs: suppress clang warnings which were breaking the github CI Theodore Ts'o
2026-05-05 0:20 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 5/7] libsupport: remove the LIST_HEAD macro from list.h Theodore Ts'o
2026-05-05 0:20 ` Darrick J. Wong
2026-05-04 23:33 ` [PATCH 6/7] libsupport: fix gcc -Wall warnings Theodore Ts'o
2026-05-05 0:20 ` Darrick J. Wong
2026-05-04 23:33 ` [PATCH 7/7] fuse2fs: fix uninitialized variable warnings Theodore Ts'o
2026-05-05 0:26 ` Darrick J. Wong [this message]
2026-05-05 0:08 ` [PATCH 0/7] fix up issues from djwong/fuse4fs-fork Darrick J. Wong
2026-05-05 7:21 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260505002650.GH1101423@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox