mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-27 15:24:11 +08:00
[component][ymodem] Fix compilation warning in MDK
Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
@@ -72,7 +72,7 @@ static enum rym_code _rym_read_code(
|
|||||||
{
|
{
|
||||||
/* Fast path */
|
/* Fast path */
|
||||||
if (rt_device_read(ctx->dev, 0, ctx->buf, 1) == 1)
|
if (rt_device_read(ctx->dev, 0, ctx->buf, 1) == 1)
|
||||||
return *ctx->buf;
|
return (enum rym_code)(*ctx->buf);
|
||||||
|
|
||||||
/* Slow path */
|
/* Slow path */
|
||||||
do {
|
do {
|
||||||
@@ -85,7 +85,7 @@ static enum rym_code _rym_read_code(
|
|||||||
/* Try to read one */
|
/* Try to read one */
|
||||||
rsz = rt_device_read(ctx->dev, 0, ctx->buf, 1);
|
rsz = rt_device_read(ctx->dev, 0, ctx->buf, 1);
|
||||||
if (rsz == 1)
|
if (rsz == 1)
|
||||||
return *ctx->buf;
|
return (enum rym_code)(*ctx->buf);
|
||||||
} while (1);
|
} while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user