Merge pull request #1348 from TanekLiang/mismath

fixed signed/unsigned mismatch warning
This commit is contained in:
Bernard Xiong 2018-04-09 13:53:18 +08:00 committed by GitHub
commit 585ef8ff52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -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) rt_size_t rt_pipe_read (rt_device_t device, rt_off_t pos, void *buffer, rt_size_t count)
{ {
uint8_t *pbuf; uint8_t *pbuf;
int read_bytes = 0; rt_size_t read_bytes = 0;
rt_pipe_t *pipe = (rt_pipe_t *)device; rt_pipe_t *pipe = (rt_pipe_t *)device;
if (device == RT_NULL) 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) rt_size_t rt_pipe_write (rt_device_t device, rt_off_t pos, const void *buffer, rt_size_t count)
{ {
uint8_t *pbuf; uint8_t *pbuf;
int write_bytes = 0; rt_size_t write_bytes = 0;
rt_pipe_t *pipe = (rt_pipe_t *)device; rt_pipe_t *pipe = (rt_pipe_t *)device;
if (device == RT_NULL) if (device == RT_NULL)

View File

@ -282,7 +282,7 @@ RTM_EXPORT(system);
static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp) static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp)
{ {
int argc; int argc;
int cmd0_size = 0; rt_size_t cmd0_size = 0;
cmd_function_t cmd_func; cmd_function_t cmd_func;
char *argv[RT_FINSH_ARG_MAX]; char *argv[RT_FINSH_ARG_MAX];
@ -448,7 +448,7 @@ void msh_auto_complete_path(char *path)
} }
else else
{ {
int length, min_length; rt_size_t length, min_length;
min_length = 0; min_length = 0;
for (;;) for (;;)

View File

@ -95,7 +95,7 @@ rt_err_t rt_mp_init(struct rt_mempool *mp,
rt_size_t block_size) rt_size_t block_size)
{ {
rt_uint8_t *block_ptr; rt_uint8_t *block_ptr;
register rt_base_t offset; register rt_size_t offset;
/* parameter check */ /* parameter check */
RT_ASSERT(mp != RT_NULL); RT_ASSERT(mp != RT_NULL);
@ -200,7 +200,7 @@ rt_mp_t rt_mp_create(const char *name,
{ {
rt_uint8_t *block_ptr; rt_uint8_t *block_ptr;
struct rt_mempool *mp; struct rt_mempool *mp;
register rt_base_t offset; register rt_size_t offset;
RT_DEBUG_NOT_IN_INTERRUPT; RT_DEBUG_NOT_IN_INTERRUPT;