Skip to content

Commit c26656c

Browse files
JordanYateskartben
authored andcommitted
fs: ext2: fix uninitialized variable
The compiler is unaware of the `block_size > 0` precondition, so it outputs warnings of uninitialized `reclen`. Explicitly initialize the variable to suppress this. Signed-off-by: Jordan Yates <[email protected]>
1 parent cd31138 commit c26656c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/fs/ext2/ext2_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ static int ext2_add_direntry(struct ext2_inode *dir, struct ext2_direntry *entry
954954
}
955955

956956
uint32_t offset = 0;
957-
uint16_t reclen;
957+
uint16_t reclen = 0;
958958

959959
struct ext2_disk_direntry *de = 0;
960960

0 commit comments

Comments
 (0)