* [PATCH] fs: jffs2: silence false positive by always initializing variable
@ 2025-09-01 11:38 Ahmad Fatoum
0 siblings, 0 replies; only message in thread
From: Ahmad Fatoum @ 2025-09-01 11:38 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
buffer is not initialized when pointed is true, but that can't
happen, because, unlike Linux, we hardcode the value at 0.
clang warns about that though, so fix the warning by always
initializing buffer.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/jffs2/readinode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index d56001e5cbb8..c205917619cd 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -30,7 +30,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
struct jffs2_raw_node_ref *ref = tn->fn->raw;
int err = 0, pointed = 0;
struct jffs2_eraseblock *jeb;
- unsigned char *buffer;
+ unsigned char *buffer = NULL;
uint32_t crc, ofs, len;
size_t retlen;
--
2.47.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-01 13:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-01 11:38 [PATCH] fs: jffs2: silence false positive by always initializing variable Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox