Skip to content

Commit cbfa49f

Browse files
MeisterBobkartben
authored andcommitted
fs: shell: fix maybe-uninitialized warning
`read` may have been used uninitialized. Signed-off-by: Gerhard Jörges <joerges@metratec.com>
1 parent cf517f9 commit cbfa49f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/fs/shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static int cmd_read(const struct shell *sh, size_t argc, char **argv)
403403
}
404404
}
405405

406-
ssize_t read;
406+
ssize_t read = 0;
407407
while (count > 0) {
408408
uint8_t buf[16];
409409
int i;

0 commit comments

Comments
 (0)