未验证 提交 5b895ad7 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1733 from zhaojuntao/ymodem

[component][ymodem] Fix compilation warning in MDK
......@@ -72,7 +72,7 @@ static enum rym_code _rym_read_code(
{
/* Fast path */
if (rt_device_read(ctx->dev, 0, ctx->buf, 1) == 1)
return *ctx->buf;
return (enum rym_code)(*ctx->buf);
/* Slow path */
do {
......@@ -85,7 +85,7 @@ static enum rym_code _rym_read_code(
/* Try to read one */
rsz = rt_device_read(ctx->dev, 0, ctx->buf, 1);
if (rsz == 1)
return *ctx->buf;
return (enum rym_code)(*ctx->buf);
} while (1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册