diff --git a/VisualC/SDL/SDL.vcproj b/VisualC/SDL/SDL.vcproj
index 6eb78aac0..f05b872e4 100644
--- a/VisualC/SDL/SDL.vcproj
+++ b/VisualC/SDL/SDL.vcproj
@@ -440,6 +440,18 @@
RelativePath="..\..\src\audio\SDL_audiotypecvt.c"
>
+
+
+
+
+
+
@@ -484,6 +496,10 @@
RelativePath="..\..\src\video\SDL_blit_slow.c"
>
+
+
@@ -524,6 +540,18 @@
RelativePath="..\..\src\audio\disk\SDL_diskaudio.h"
>
+
+
+
+
+
+
@@ -569,7 +597,7 @@
>
palette->ncolors) {
+ if ((int)biClrUsed > palette->ncolors) {
palette->ncolors = biClrUsed;
palette->colors =
(SDL_Color *) SDL_realloc(palette->colors,
@@ -229,7 +229,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
was_error = 1;
goto done;
}
- } else if (biClrUsed < palette->ncolors) {
+ } else if ((int)biClrUsed < palette->ncolors) {
palette->ncolors = biClrUsed;
}
if (biSize == 12) {
diff --git a/src/video/SDL_draw.h b/src/video/SDL_draw.h
index b37758c27..b1ae34008 100644
--- a/src/video/SDL_draw.h
+++ b/src/video/SDL_draw.h
@@ -30,7 +30,7 @@
#define DRAW_MUL(_a, _b) (((unsigned)(_a)*(_b))/255)
#define DRAW_FASTSETPIXEL(x, y, type, bpp, color) \
- *(type *)(dst->pixels + y * dst->pitch + x * bpp) = (type) color
+ *(type *)((Uint8 *)dst->pixels + y * dst->pitch + x * bpp) = (type) color
#define DRAW_FASTSETPIXEL1(x, y) DRAW_FASTSETPIXEL(x, y, Uint8, 1, color);
#define DRAW_FASTSETPIXEL2(x, y) DRAW_FASTSETPIXEL(x, y, Uint16, 2, color);
@@ -74,7 +74,7 @@ do { \
#define DRAW_SETPIXELXY(x, y, type, bpp, op) \
do { \
- type *pixel = (type *)(dst->pixels + y * dst->pitch + x * bpp); \
+ type *pixel = (type *)((Uint8 *)dst->pixels + y * dst->pitch + x * bpp); \
op; \
} while (0)
@@ -346,7 +346,6 @@ do { \
#define FILLRECT(type, op) \
do { \
- int w; \
int width = dstrect->w; \
int height = dstrect->h; \
int pitch = (dst->pitch / dst->format->BytesPerPixel); \
diff --git a/src/video/SDL_renderer_gl.c b/src/video/SDL_renderer_gl.c
index 7ffbf01e8..33929ad73 100644
--- a/src/video/SDL_renderer_gl.c
+++ b/src/video/SDL_renderer_gl.c
@@ -519,9 +519,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code)
{
const int have_texture_rects = data->GL_ARB_texture_rectangle_supported;
const char *replacement = have_texture_rects ? "RECT" : "2D";
- const size_t replacementlen = strlen(replacement);
+ const size_t replacementlen = SDL_strlen(replacement);
const char *token = "%TEXTURETARGET%";
- const size_t tokenlen = strlen(token);
+ const size_t tokenlen = SDL_strlen(token);
char *code = NULL;
char *ptr = NULL;
GLuint program = 0;
@@ -536,9 +536,9 @@ compile_shader(GL_RenderData * data, GLenum shader_type, const char *_code)
return 0;
for (ptr = SDL_strstr(code, token); ptr; ptr = SDL_strstr(ptr + 1, token)) {
- memcpy(ptr, replacement, replacementlen);
- memmove(ptr + replacementlen, ptr + tokenlen,
- strlen(ptr + tokenlen) + 1);
+ SDL_memcpy(ptr, replacement, replacementlen);
+ SDL_memmove(ptr + replacementlen, ptr + tokenlen,
+ SDL_strlen(ptr + tokenlen) + 1);
}
#if DEBUG_PROGRAM_COMPILE
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index ebec773b0..ee71c39ea 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2075,7 +2075,6 @@ SDL_RenderPoint(int x, int y)
{
SDL_Renderer *renderer;
SDL_Window *window;
- SDL_Rect real_rect;
if (!_this) {
SDL_UninitializedVideo();
diff --git a/src/video/win32/SDL_win32events.c b/src/video/win32/SDL_win32events.c
index 54e1ee105..6605deff1 100644
--- a/src/video/win32/SDL_win32events.c
+++ b/src/video/win32/SDL_win32events.c
@@ -214,7 +214,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_INPUT: /* mouse events */
{
LPBYTE lpb;
- int w, h;
const RAWINPUTHEADER *header;
int index;
int i;