diff options
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/app/dvd/dvd.c | 4 | ||||
-rw-r--r-- | src/user/lib/string.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/user/app/dvd/dvd.c b/src/user/app/dvd/dvd.c index ed9778c..f880782 100644 --- a/src/user/app/dvd/dvd.c +++ b/src/user/app/dvd/dvd.c @@ -30,8 +30,8 @@ int main(void) { uint32_t col = 0x800000; for (;;) { - if (x + dx < 0 || x + dx + w >= fb.width ) dx *= -1; - if (y + dy < 0 || y + dy + h >= fb.height) dy *= -1; + if (x + dx < 0 || (size_t)(x + dx + w) >= fb.width) dx *= -1; + if (y + dy < 0 || (size_t)(y + dy + h) >= fb.height) dy *= -1; x += dx; y += dy; draw_rect(x, y, w, h, col++); diff --git a/src/user/lib/string.c b/src/user/lib/string.c index 92b2e51..a6ac75b 100644 --- a/src/user/lib/string.c +++ b/src/user/lib/string.c @@ -52,7 +52,7 @@ long strtol(const char *restrict s, char **restrict end, int base) { char *strchr(const char *s, int c) { while (*s) { - if (*s == c) return s; + if (*s == c) return (char*)s; s++; } return NULL; |