From 42765792bcf3f79b850edaad6738d49303199437 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 31 Jul 2019 04:41:46 +0000 Subject: [PATCH] Shut up some warnings --- src/Backends/Rendering/SDLSurface.cpp | 2 +- src/Backends/Rendering/SDLTexture.cpp | 6 +++--- src/Backends/Rendering/Software.cpp | 2 +- src/NpcTbl.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Backends/Rendering/SDLSurface.cpp b/src/Backends/Rendering/SDLSurface.cpp index 56a4cc85..41250590 100644 --- a/src/Backends/Rendering/SDLSurface.cpp +++ b/src/Backends/Rendering/SDLSurface.cpp @@ -106,7 +106,7 @@ unsigned char* Backend_Lock(Backend_Surface *surface, unsigned int *pitch) void Backend_Unlock(Backend_Surface *surface) { - + (void)surface; } void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y, BOOL colour_key) diff --git a/src/Backends/Rendering/SDLTexture.cpp b/src/Backends/Rendering/SDLTexture.cpp index 1967db36..5855c9da 100644 --- a/src/Backends/Rendering/SDLTexture.cpp +++ b/src/Backends/Rendering/SDLTexture.cpp @@ -207,7 +207,7 @@ void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Sur SDL_Rect source_rect; RectToSDLRect(rect, &source_rect); - SDL_Rect destination_rect = {x, y, source_rect.w, source_rect.h}; + SDL_Rect destination_rect = {(int)x, (int)y, source_rect.w, source_rect.h}; // Blit the surface SDL_SetSurfaceBlendMode(source_surface->sdl_surface, colour_key ? SDL_BLENDMODE_BLEND : SDL_BLENDMODE_NONE); @@ -234,7 +234,7 @@ void Backend_BlitToScreen(Backend_Surface *source_surface, const RECT *rect, lon SDL_Rect source_rect; RectToSDLRect(rect, &source_rect); - SDL_Rect destination_rect = {x, y, source_rect.w, source_rect.h}; + SDL_Rect destination_rect = {(int)x, (int)y, source_rect.w, source_rect.h}; // Blit the texture SDL_SetTextureBlendMode(source_surface->texture, colour_key ? SDL_BLENDMODE_BLEND : SDL_BLENDMODE_NONE); @@ -398,7 +398,7 @@ void Backend_DrawGlyph(Backend_Surface *surface, Backend_Glyph *glyph, long x, l if (glyph == NULL || surface == NULL) return; - SDL_Rect destination_rect = {x, y, glyph->surface->sdl_surface->w, glyph->surface->sdl_surface->h}; + SDL_Rect destination_rect = {(int)x, (int)y, glyph->surface->sdl_surface->w, glyph->surface->sdl_surface->h}; SDL_SetSurfaceColorMod(glyph->surface->sdl_surface, colours[0], colours[1], colours[2]); SDL_SetSurfaceBlendMode(glyph->surface->sdl_surface, SDL_BLENDMODE_BLEND); diff --git a/src/Backends/Rendering/Software.cpp b/src/Backends/Rendering/Software.cpp index 0f88e668..6294fd98 100644 --- a/src/Backends/Rendering/Software.cpp +++ b/src/Backends/Rendering/Software.cpp @@ -111,7 +111,7 @@ unsigned char* Backend_Lock(Backend_Surface *surface, unsigned int *pitch) void Backend_Unlock(Backend_Surface *surface) { - + (void)surface; } void Backend_Blit(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y, BOOL colour_key) diff --git a/src/NpcTbl.cpp b/src/NpcTbl.cpp index 7a653b99..56a46349 100644 --- a/src/NpcTbl.cpp +++ b/src/NpcTbl.cpp @@ -17,7 +17,7 @@ BOOL LoadNpcTable(const char *path) FILE *fp; long n; long num; - unsigned long size; + long size; size = GetFileSizeLong(path); if (size == -1)