From 58cea29223e4280be8b8ab78235b5eb9b85b76db Mon Sep 17 00:00:00 2001 From: Marco Costa Date: Mon, 22 Sep 2014 20:37:35 -0400 Subject: [PATCH] Fix errors/warnings in VS build * Added libspeex to 'Debug' target, previously only 'Release' had it. * Initialize some pointers with NULL when an uninitialized code path is unlikely, but possible. --- projects/openrct2.vcxproj | 2 +- src/input.c | 2 +- src/language.c | 3 ++- src/park.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj index d956ad6eed..82f552e1ba 100644 --- a/projects/openrct2.vcxproj +++ b/projects/openrct2.vcxproj @@ -190,7 +190,7 @@ - $(SolutionDir)..\lodepng;$(SolutionDir)..\sdl\include;$(IncludePath) + $(SolutionDir)..\lodepng;$(SolutionDir)..\sdl\include;$(SolutionDir)..\libspeex;$(IncludePath) $(SolutionDir)..\sdl\lib\x86;$(LibraryPath) $(SolutionDir)..\build\$(Configuration)\ $(SolutionDir)..\obj\$(Configuration)\ diff --git a/src/input.c b/src/input.c index 74020608c3..7726555c76 100644 --- a/src/input.c +++ b/src/input.c @@ -1062,7 +1062,7 @@ static void input_mouseover(int x, int y, rct_window *w, int widgetIndex) { rct_windowclass windowClass = 255; rct_windownumber windowNumber = 0; - rct_widget *widget; + rct_widget *widget = NULL; if (w != NULL) { windowClass = w->classification; diff --git a/src/language.c b/src/language.c index e28d174d1f..e6e9fb099a 100644 --- a/src/language.c +++ b/src/language.c @@ -134,7 +134,8 @@ static int language_open_file(const char *filename) language_strings = calloc(STR_COUNT, sizeof(char*)); - char *dst, *token; + char *dst = NULL; + char *token = NULL; char tokenBuffer[64]; int i, stringIndex = 0, mode = 0, string_no; for (i = 0; i < language_buffer_size; i++) { diff --git a/src/park.c b/src/park.c index ed937cab47..f4ad3dc9b8 100644 --- a/src/park.c +++ b/src/park.c @@ -467,7 +467,7 @@ static void get_random_peep_spawn(rct2_peep_spawn *spawn) static rct_peep *park_generate_new_guest() { - rct_peep *peep; + rct_peep *peep = NULL; rct2_peep_spawn spawn; get_random_peep_spawn(&spawn);