[Scummvm-git-logs] scummvm master -> 78ef4b9499200d9c55e5ed537f7f037538583367

digitall 547637+digitall at users.noreply.github.com
Wed Oct 2 07:18:36 CEST 2019


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

Summary:
78ef4b9499 COMMON: Add Default Cases to Switch Statements in Memstream Classes


Commit: 78ef4b9499200d9c55e5ed537f7f037538583367
    https://github.com/scummvm/scummvm/commit/78ef4b9499200d9c55e5ed537f7f037538583367
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-02T06:12:38+01:00

Commit Message:
COMMON: Add Default Cases to Switch Statements in Memstream Classes

These are flagged by GCC if -Wswitch-default is enabled.

This avoids possible hard to diagnose bugs if the whence int parameter is
accidently set to an unexpected value.

Changed paths:
    common/memstream.h


diff --git a/common/memstream.h b/common/memstream.h
index 991268c..68cfdce 100644
--- a/common/memstream.h
+++ b/common/memstream.h
@@ -137,6 +137,8 @@ public:
 			offset = size() + offset;
 			// Fall through
 		case SEEK_SET:
+			// Fall through
+		default:
 			_ptr = _ptrOrig + offset;
 			_pos = offset;
 			break;
@@ -219,6 +221,8 @@ public:
 			offs = _size + offs;
 			// Fall through
 		case SEEK_SET:
+			// Fall through
+		default:
 			_ptr = _data + offs;
 			_pos = offs;
 			break;





More information about the Scummvm-git-logs mailing list