From 4bfd5c6f4ceaa39a4ec967ce83c15eec3aba567e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 6 Oct 2016 23:12:07 +0200 Subject: [PATCH] Hide unused variables in some configurations --- src/openrct2.c | 4 +++- src/ride/coaster/wild_mouse.c | 2 -- src/ride/water/log_flume.c | 2 -- src/ride/water/river_rapids.c | 2 ++ test/testpaint/intercept.c | 2 -- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/openrct2.c b/src/openrct2.c index 58aaeb948d..7bc058ee36 100644 --- a/src/openrct2.c +++ b/src/openrct2.c @@ -50,8 +50,10 @@ int gExitCode; +#if defined(USE_MMAP) && (defined(__unix__) || defined(__MACOSX__)) && !defined(NO_RCT2) + static int fdData = -1; +#endif #if defined(__unix__) && !defined(NO_RCT2) - static int fdData; static char * segments = (char *)(GOOD_PLACE_FOR_DATA_SEGMENT); #endif diff --git a/src/ride/coaster/wild_mouse.c b/src/ride/coaster/wild_mouse.c index 24dae66a0f..e54ac5bfb1 100644 --- a/src/ride/coaster/wild_mouse.c +++ b/src/ride/coaster/wild_mouse.c @@ -441,7 +441,6 @@ static void wild_mouse_track_right_quarter_turn_3(uint8 rideIndex, uint8 trackSe { SPR_WILD_MOUSE_QUARTER_TURN_3_SE_NE_PART_2, { 0, 0, 0 }, { 0, 6, 0 }, { 32, 20, 3 } }, } }; - static uint8 supportType[] = { 4, 5, 2, 3 }; track_paint_util_right_quarter_turn_3_tiles_paint_3(height, direction, get_current_rotation(), trackSequence, gTrackColours[SCHEME_TRACK], imageIds); track_paint_util_right_quarter_turn_3_tiles_tunnel(height, direction, trackSequence, TUNNEL_0); @@ -591,7 +590,6 @@ static void wild_mouse_track_left_quarter_turn_1(uint8 rideIndex, uint8 trackSeq SPR_WILD_MOUSE_QUARTER_TURN_1_NE_SW, SPR_WILD_MOUSE_QUARTER_TURN_1_SE_NW, }; - static uint8 supportType[] = { 5, 2, 3, 4 }; uint32 imageId = imageIds[direction] | gTrackColours[SCHEME_TRACK]; switch (direction) { diff --git a/src/ride/water/log_flume.c b/src/ride/water/log_flume.c index 7576999559..090ef07f0e 100644 --- a/src/ride/water/log_flume.c +++ b/src/ride/water/log_flume.c @@ -187,8 +187,6 @@ static void paint_log_flume_track_flat(uint8 rideIndex, uint8 trackSequence, uin static void paint_log_flume_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { - rct_ride *ride = get_ride(rideIndex); - uint32 imageId = LogFlumeTrackFlatImageIds[direction][0] | gTrackColours[SCHEME_TRACK]; sub_98197C_rotated(direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3); diff --git a/src/ride/water/river_rapids.c b/src/ride/water/river_rapids.c index cd72fc4a69..20c2842c68 100644 --- a/src/ride/water/river_rapids.c +++ b/src/ride/water/river_rapids.c @@ -25,6 +25,7 @@ #include "../../paint/supports.h" #include "../../world/map.h" +#ifndef NO_VEHICLES // 0x0099279E: static const vehicle_boundbox _riverRapidsBoundbox[] = { { -13, -13, 1, 26, 26, 13 }, @@ -37,6 +38,7 @@ static const vehicle_boundbox _riverRapidsBoundbox[] = { { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 } }; +#endif enum { diff --git a/test/testpaint/intercept.c b/test/testpaint/intercept.c index 6db89ba56e..a868001fdd 100644 --- a/test/testpaint/intercept.c +++ b/test/testpaint/intercept.c @@ -367,7 +367,6 @@ static void printImageId(uint32 input, utf8string *out) { uint32 image = input & 0x7FFFF; uint32 palette = input & ~0x7FFFF; - bool allocated = false; utf8string paletteName; if (palette == DEFAULT_SCHEME_TRACK)paletteName = "SCHEME_TRACK"; else if (palette == DEFAULT_SCHEME_SUPPORTS)paletteName = "SCHEME_SUPPORTS"; @@ -528,7 +527,6 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error) rct_drawpixelinfo dpi = {.zoom_level = 1}; unk_140E9A8 = &dpi; - rct_vehicle vehicle = { 0 }; rct_ride ride = { 0 }; rct_ride_entry rideEntry = { 0 };