diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index d3f4d72eb1..3107da4aa8 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -172,7 +172,7 @@ static void x11_set_window_pid(Display *dpy, Window win) errno = 0; if((scret = sysconf(_SC_HOST_NAME_MAX)) == -1 && errno) return; - if((hostname = malloc(scret + 1)) == NULL) + if((hostname = (char*)malloc(scret + 1)) == NULL) return; if(gethostname(hostname, scret + 1) == -1) diff --git a/libretro-common/streams/file_stream.c b/libretro-common/streams/file_stream.c index 593a735099..0c6a876e2d 100644 --- a/libretro-common/streams/file_stream.c +++ b/libretro-common/streams/file_stream.c @@ -396,7 +396,7 @@ int filestream_read_file(const char *path, void **buf, ssize_t *len) if (!content_buf) goto error; - if ((size_t)(content_buf_size + 1) != (content_buf_size + 1)) + if ((int64_t)(size_t)(content_buf_size + 1) != (content_buf_size + 1)) goto error; ret = filestream_read(file, content_buf, (int64_t)content_buf_size);