diff options
| author | Bernard Xiong <[email protected]> | 2019-02-13 09:39:33 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-02-13 09:39:33 +0800 |
| commit | db1f0f32b5bd4c73a17cb39d81f7100c4b219209 (patch) | |
| tree | 31ad9f66b3188d3911b16a92c7cb54675cc6bc63 /src | |
| parent | f182626681adbe9e10c64e38bf06cef804312b2d (diff) | |
| parent | 7383269905417f9e4f8f5304e164e0ae31d7169a (diff) | |
Merge pull request #2319 from RT-Thread/fix_warning
[Kernel] Code cleanup for compiling warning.
Diffstat (limited to 'src')
| -rw-r--r-- | src/kservice.c | 2 | ||||
| -rw-r--r-- | src/mem.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/kservice.c b/src/kservice.c index dc7370d58b..b640107a33 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -476,7 +476,7 @@ rt_size_t rt_strnlen(const char *s, rt_ubase_t maxlen) { const char *sc; - for (sc = s; *sc != '\0' && sc - s < maxlen; ++sc) /* nothing */ + for (sc = s; *sc != '\0' && sc - s < (int)maxlen; ++sc) /* nothing */ ; return sc - s; @@ -644,7 +644,7 @@ int memcheck(void) { position = (rt_ubase_t)mem - (rt_ubase_t)heap_ptr; if (position < 0) goto __exit; - if (position > mem_size_aligned) goto __exit; + if (position > (int)mem_size_aligned) goto __exit; if (mem->magic != HEAP_MAGIC) goto __exit; if (mem->used != 0 && mem->used != 1) goto __exit; } |
