summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorliang yongxiang <[email protected]>2018-04-09 11:58:11 +0800
committerliang yongxiang <[email protected]>2018-04-09 12:05:51 +0800
commitcc81b47be2aa84674bd06f7d9e4895680cc91740 (patch)
tree0e28d3dfd1812f49610498028b75d029bf740873 /components
parent8dc83822773081c35d546b7f094b542c9f4b6150 (diff)
[components] fixed signed/unsigned mismatch warning
Diffstat (limited to 'components')
-rw-r--r--components/drivers/src/pipe.c4
-rw-r--r--components/finsh/msh.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/components/drivers/src/pipe.c b/components/drivers/src/pipe.c
index 61b8a5db6b..ee9c8ba02a 100644
--- a/components/drivers/src/pipe.c
+++ b/components/drivers/src/pipe.c
@@ -358,7 +358,7 @@ rt_err_t rt_pipe_close (rt_device_t device)
rt_size_t rt_pipe_read (rt_device_t device, rt_off_t pos, void *buffer, rt_size_t count)
{
uint8_t *pbuf;
- int read_bytes = 0;
+ rt_size_t read_bytes = 0;
rt_pipe_t *pipe = (rt_pipe_t *)device;
if (device == RT_NULL)
@@ -386,7 +386,7 @@ rt_size_t rt_pipe_read (rt_device_t device, rt_off_t pos, void *buffer, rt_siz
rt_size_t rt_pipe_write (rt_device_t device, rt_off_t pos, const void *buffer, rt_size_t count)
{
uint8_t *pbuf;
- int write_bytes = 0;
+ rt_size_t write_bytes = 0;
rt_pipe_t *pipe = (rt_pipe_t *)device;
if (device == RT_NULL)
diff --git a/components/finsh/msh.c b/components/finsh/msh.c
index f308e70ace..b540698d9c 100644
--- a/components/finsh/msh.c
+++ b/components/finsh/msh.c
@@ -282,7 +282,7 @@ RTM_EXPORT(system);
static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp)
{
int argc;
- int cmd0_size = 0;
+ rt_size_t cmd0_size = 0;
cmd_function_t cmd_func;
char *argv[RT_FINSH_ARG_MAX];
@@ -448,7 +448,7 @@ void msh_auto_complete_path(char *path)
}
else
{
- int length, min_length;
+ rt_size_t length, min_length;
min_length = 0;
for (;;)