Skip to content

Commit 3b161b5

Browse files
committed
[component][ymodem] Fix compilation warning in MDK
Signed-off-by: MurphyZhao <[email protected]>
1 parent 8b73db6 commit 3b161b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/utilities/ymodem/ymodem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static enum rym_code _rym_read_code(
7272
{
7373
/* Fast path */
7474
if (rt_device_read(ctx->dev, 0, ctx->buf, 1) == 1)
75-
return *ctx->buf;
75+
return (enum rym_code)(*ctx->buf);
7676

7777
/* Slow path */
7878
do {
@@ -85,7 +85,7 @@ static enum rym_code _rym_read_code(
8585
/* Try to read one */
8686
rsz = rt_device_read(ctx->dev, 0, ctx->buf, 1);
8787
if (rsz == 1)
88-
return *ctx->buf;
88+
return (enum rym_code)(*ctx->buf);
8989
} while (1);
9090
}
9191

0 commit comments

Comments
 (0)