[Scummvm-git-logs] scummvm master -> 276f6e0bfd5a40ab6e06a5af03f5ab53b78b3f9c

dreammaster paulfgilbert at gmail.com
Thu May 9 10:13:18 CEST 2019


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
03c43f0588 CLOUD: Fix MSVC warnings
2365b678b3 IMAGE: Fix MSVC warnings
369ba0c4b7 AUDIO: Fix MSVC warnings
8d17b6c48a AUDIO: Fix MSVC warnings
276f6e0bfd SDL: Fix MSVC warnings


Commit: 03c43f05883b82487401f82a50cce951a4aee30c
    https://github.com/scummvm/scummvm/commit/03c43f05883b82487401f82a50cce951a4aee30c
Author: SupSuper (supsuper at gmail.com)
Date: 2019-05-09T18:13:10+10:00

Commit Message:
CLOUD: Fix MSVC warnings

Fixes warning C4305: truncation from 'double' to 'float'

Changed paths:
    backends/cloud/cloudicon.cpp


diff --git a/backends/cloud/cloudicon.cpp b/backends/cloud/cloudicon.cpp
index 2adc746..fcac856 100644
--- a/backends/cloud/cloudicon.cpp
+++ b/backends/cloud/cloudicon.cpp
@@ -27,9 +27,9 @@
 
 namespace Cloud {
 
-const float CloudIcon::ALPHA_SPEED = 0.0005;
-const float CloudIcon::ALPHA_MAX = 1;
-const float CloudIcon::ALPHA_MIN = 0.6;
+const float CloudIcon::ALPHA_SPEED = 0.0005f;
+const float CloudIcon::ALPHA_MAX = 1.f;
+const float CloudIcon::ALPHA_MIN = 0.6f;
 
 CloudIcon::CloudIcon() {
 	initIcons();


Commit: 2365b678b30470d9cf5580126335cee700ac1c4f
    https://github.com/scummvm/scummvm/commit/2365b678b30470d9cf5580126335cee700ac1c4f
Author: SupSuper (supsuper at gmail.com)
Date: 2019-05-09T18:13:10+10:00

Commit Message:
IMAGE: Fix MSVC warnings

Fixes warning C4067: unexpected tokens following preprocessor directive
due to non-standard "and" "or" operators

Changed paths:
    image/jpeg.cpp


diff --git a/image/jpeg.cpp b/image/jpeg.cpp
index 4605d17..2975cb1 100644
--- a/image/jpeg.cpp
+++ b/image/jpeg.cpp
@@ -184,7 +184,7 @@ void outputMessage(j_common_ptr cinfo) {
 }
 
 J_COLOR_SPACE fromScummvmPixelFormat(const Graphics::PixelFormat &format) {
-#if defined(JCS_EXTENSIONS) or defined(JCS_ALPHA_EXTENSIONS)
+#if defined(JCS_EXTENSIONS) || defined(JCS_ALPHA_EXTENSIONS)
 	struct PixelFormatMapping {
 		Graphics::PixelFormat pixelFormat;
 		J_COLOR_SPACE bigEndianColorSpace;
@@ -200,7 +200,7 @@ J_COLOR_SPACE fromScummvmPixelFormat(const Graphics::PixelFormat &format) {
 		{ Graphics::PixelFormat(3, 8, 8, 8, 0, 16,  8,  0,  0), JCS_EXT_RGB,  JCS_EXT_BGR  },
 		{ Graphics::PixelFormat(3, 8, 8, 8, 0,  0,  8, 16,  0), JCS_EXT_BGR,  JCS_EXT_RGB  }
 #endif
-#if defined(JCS_EXTENSIONS) and defined(JCS_ALPHA_EXTENSIONS)
+#if defined(JCS_EXTENSIONS) && defined(JCS_ALPHA_EXTENSIONS)
 		,
 #endif
 #ifdef JCS_ALPHA_EXTENSIONS


Commit: 369ba0c4b7f1278c415f7c7655cfa6cc5ae2b5fb
    https://github.com/scummvm/scummvm/commit/369ba0c4b7f1278c415f7c7655cfa6cc5ae2b5fb
Author: SupSuper (supsuper at gmail.com)
Date: 2019-05-09T18:13:10+10:00

Commit Message:
AUDIO: Fix MSVC warnings

Fixes warning C4530: C++ exception handler used, but unwind semantics are not enabled
by disabling exceptions in the STL since ScummVM doesn't support them

Changed paths:
    audio/softsynth/mt32/FileStream.cpp


diff --git a/audio/softsynth/mt32/FileStream.cpp b/audio/softsynth/mt32/FileStream.cpp
index 081f41a..9e477d4 100644
--- a/audio/softsynth/mt32/FileStream.cpp
+++ b/audio/softsynth/mt32/FileStream.cpp
@@ -21,6 +21,10 @@
 
 #include "internals.h"
 
+// Disable MSVC STL exceptions
+#ifdef _MSC_VER
+#define _HAS_EXCEPTIONS 0
+#endif
 #include "FileStream.h"
 
 namespace MT32Emu {


Commit: 8d17b6c48a91e7f12a707712c9e85d7c3bee9637
    https://github.com/scummvm/scummvm/commit/8d17b6c48a91e7f12a707712c9e85d7c3bee9637
Author: SupSuper (supsuper at gmail.com)
Date: 2019-05-09T18:13:10+10:00

Commit Message:
AUDIO: Fix MSVC warnings

Fixes warning C4245: signed/unsigned mismatch
(seems in line with other decoders)

Changed paths:
    audio/decoders/adpcm_intern.h


diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h
index 4b7b348..889b0a8 100644
--- a/audio/decoders/adpcm_intern.h
+++ b/audio/decoders/adpcm_intern.h
@@ -68,7 +68,7 @@ public:
 
 	virtual bool rewind();
 	virtual bool seek(const Timestamp &where) { return false; }
-	virtual Timestamp getLength() const { return -1; }
+	virtual Timestamp getLength() const { return Timestamp(); }
 
 	/**
 	 * This table is used by some ADPCM variants (IMA and OKI) to adjust the


Commit: 276f6e0bfd5a40ab6e06a5af03f5ab53b78b3f9c
    https://github.com/scummvm/scummvm/commit/276f6e0bfd5a40ab6e06a5af03f5ab53b78b3f9c
Author: SupSuper (supsuper at gmail.com)
Date: 2019-05-09T18:13:10+10:00

Commit Message:
SDL: Fix MSVC warnings

Fixes warning C4121: alignment of a member was sensitive to packing
by hiding warnings from system headers

Changed paths:
    backends/platform/sdl/sdl-sys.h


diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h
index 9b87f5e..edb57c3 100644
--- a/backends/platform/sdl/sdl-sys.h
+++ b/backends/platform/sdl/sdl-sys.h
@@ -144,7 +144,11 @@
 #include <SDL.h>
 #endif
 
+// Ignore warnings from system headers pulled by SDL
+#pragma warning(push)
+#pragma warning(disable:4121) // alignment of a member was sensitive to packing
 #include <SDL_syswm.h>
+#pragma warning(pop)
 
 // Restore the forbidden exceptions from the hack above
 #if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && defined(_MSC_VER)





More information about the Scummvm-git-logs mailing list