diff --git a/deps/zlib/zutil.c b/deps/zlib/zutil.c
index 4bcceb536a..97ad075ea6 100644
--- a/deps/zlib/zutil.c
+++ b/deps/zlib/zutil.c
@@ -10,7 +10,7 @@
 #  include "gzguts.h"
 #endif
 
-char * const z_errmsg[10] = {
+char z_errmsg[10][21] = {
    "need dictionary",     /* Z_NEED_DICT       2  */
    "stream end",          /* Z_STREAM_END      1  */
    "",                    /* Z_OK              0  */
diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c
index 85422c3f11..f7617e68ef 100644
--- a/gfx/drivers_context/wgl_ctx.c
+++ b/gfx/drivers_context/wgl_ctx.c
@@ -526,7 +526,7 @@ static bool gfx_ctx_wgl_set_video_mode(void *data,
    {
       if (!fullscreen && settings->ui.menubar_enable)
       {
-         RECT rc_temp = {0, 0, height, 0x7FFF};
+         RECT rc_temp = {0, 0, (LONG)height, 0x7FFF};
          SetMenu(g_hwnd, LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_MENU)));
          SendMessage(g_hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rc_temp);
          g_resize_height = height += rc_temp.top + rect.top;
diff --git a/libretro-common/include/compat/zutil.h b/libretro-common/include/compat/zutil.h
index 8aebee91f8..01ad4740aa 100644
--- a/libretro-common/include/compat/zutil.h
+++ b/libretro-common/include/compat/zutil.h
@@ -49,8 +49,9 @@ typedef unsigned short ush;
 typedef ush FAR ushf;
 typedef unsigned long  ulg;
 
-extern char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
+extern char z_errmsg[10][21]; /* indexed by 2-zlib_error */
+/* (array size given to avoid silly warnings with Visual C++) */
+/* (array entry size given to avoid silly string cast warnings) */
 
 #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]