Skip to content

Commit eec88e3

Browse files
committed
shell/sc_can: fix uninitialized warning
When compiled for `hifive1` board with `gcc-7.2.0` this warning was raised: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
1 parent d3b5a79 commit eec88e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/shell/commands/sc_can.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int _dump(int argc, char **argv)
8383
return 0;
8484
}
8585

86-
int ret;
86+
int ret = -1;
8787
struct can_filter filters[SC_CAN_MAX_FILTERS];
8888
conn_can_raw_t conn;
8989
struct can_frame frame;

0 commit comments

Comments
 (0)