Merge pull request #1733 from zhaojuntao/ymodem

[component][ymodem] Fix compilation warning in MDK
This commit is contained in:
Bernard Xiong 2018-08-23 18:30:16 +08:00 committed by GitHub
commit 5b895ad7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
} }