diff --git a/openrct2.common.props b/openrct2.common.props index 13ce36d2ec..3a84b2163d 100644 --- a/openrct2.common.props +++ b/openrct2.common.props @@ -29,11 +29,14 @@ - 4091;4100;4201;4244;4245;%(DisableSpecificWarnings) + 4091;4100;4201;4204;4206;4221;4244;4245;%(DisableSpecificWarnings) diff --git a/src/openrct2/Imaging.cpp b/src/openrct2/Imaging.cpp index 81795ee03a..d8302914f1 100644 --- a/src/openrct2/Imaging.cpp +++ b/src/openrct2/Imaging.cpp @@ -14,6 +14,8 @@ *****************************************************************************/ #pragma endregion +#pragma warning(disable : 4611) // interaction between '_setjmp' and C++ object destruction is non-portable + #include #include "core/Exception.hpp" #include "core/FileStream.hpp" diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index 748207e281..0c6777cd92 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -222,7 +222,7 @@ namespace String { // Try again with bigger buffer buffer = Memory::Reallocate(buffer, bufferSize); - int len = vsnprintf(buffer, bufferSize, format, args); + len = vsnprintf(buffer, bufferSize, format, args); if (len < 0) { Memory::Free(buffer); diff --git a/src/openrct2/drawing/drawing_fast.cpp b/src/openrct2/drawing/drawing_fast.cpp index a07e2be091..516ef0a45b 100644 --- a/src/openrct2/drawing/drawing_fast.cpp +++ b/src/openrct2/drawing/drawing_fast.cpp @@ -14,6 +14,8 @@ *****************************************************************************/ #pragma endregion +#pragma warning(disable : 4127) // conditional expression is constant + extern "C" { #include "drawing.h" diff --git a/src/openrct2/drawing/sprite.c b/src/openrct2/drawing/sprite.c index 3fdddca8c8..a9fde05ad3 100644 --- a/src/openrct2/drawing/sprite.c +++ b/src/openrct2/drawing/sprite.c @@ -73,26 +73,6 @@ bool gfx_load_g1() if (file != NULL) { rct_g1_header header; if (SDL_RWread(file, &header, 8, 1) == 1) { - /* We need to load in the data file, which has an `offset` field, - * which is supposed to hold a pointer, but is only 32 bit long. - * We will load a 32 bit version of rct_g1_element and then convert - * pointers to however long our machine wants them. - */ - - #pragma pack(push, 1) - // Size: 0x10 - typedef struct { - uint32 offset; // 0x00 note: uint32 always! - sint16 width; // 0x04 - sint16 height; // 0x06 - sint16 x_offset; // 0x08 - sint16 y_offset; // 0x0A - uint16 flags; // 0x0C - uint16 zoomed_offset; // 0x0E - } rct_g1_element_32bit; - assert_struct_size(rct_g1_element_32bit, 0x10); - #pragma pack(pop) - /* number of elements is stored in g1.dat, but because the entry * headers are static, this can't be variable until made into a * dynamic array. @@ -547,8 +527,8 @@ void FASTCALL gfx_draw_sprite_raw_masked_software(rct_drawpixelinfo *dpi, int x, int maskWrap = imgMask->width - width; int colourWrap = imgColour->width - width; int dstWrap = ((dpi->width + dpi->pitch) - width); - for (int y = top; y < bottom; y++) { - for (int x = left; x < right; x++) { + for (int yy = top; yy < bottom; yy++) { + for (int xx = left; xx < right; xx++) { uint8 colour = (*colourSrc) & (*maskSrc); if (colour != 0) { *dst = colour; diff --git a/src/openrct2/drawing/string.c b/src/openrct2/drawing/string.c index f9c0b3ade7..79b39825c6 100644 --- a/src/openrct2/drawing/string.c +++ b/src/openrct2/drawing/string.c @@ -181,7 +181,7 @@ int gfx_wrap_string(utf8 *text, int width, int *outNumLines, int *outFontHeight) utf8 *currentWord = NULL; // Width of line up to current word - int currentWidth; + int currentWidth = 0; utf8 *ch = text; utf8 *firstCh = text; diff --git a/src/openrct2/interface/Theme.cpp b/src/openrct2/interface/Theme.cpp index 8e91b8930b..0cf808973c 100644 --- a/src/openrct2/interface/Theme.cpp +++ b/src/openrct2/interface/Theme.cpp @@ -14,6 +14,8 @@ *****************************************************************************/ #pragma endregion +#pragma warning(disable : 4706) // assignment within conditional expression + #include #include