aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/common/str.h24
-rw-r--r--tools/create_msvc/create_msvc.cpp3
-rw-r--r--tools/md5table.c4
-rw-r--r--tools/module.mk6
-rw-r--r--tools/scumm-md5.txt3
5 files changed, 32 insertions, 8 deletions
diff --git a/test/common/str.h b/test/common/str.h
index 16fb0859db..6581c37cdb 100644
--- a/test/common/str.h
+++ b/test/common/str.h
@@ -118,6 +118,30 @@ class StringTestSuite : public CxxTest::TestSuite
TS_ASSERT_EQUALS(foo3, "fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd""fooasdkadklasdjklasdjlkasjdlkasjdklasjdlkjasdasd");
}
+ void test_refCount5() {
+ // using external storage
+ Common::String foo1("HelloHelloHelloHelloAndHi");
+ Common::String foo2(foo1);
+
+ for (Common::String::iterator i = foo2.begin(); i != foo2.end(); ++i)
+ *i = 'h';
+
+ TS_ASSERT_EQUALS(foo1, "HelloHelloHelloHelloAndHi");
+ TS_ASSERT_EQUALS(foo2, "hhhhhhhhhhhhhhhhhhhhhhhhh");
+ }
+
+ void test_refCount6() {
+ // using internal storage
+ Common::String foo1("Hello");
+ Common::String foo2(foo1);
+
+ for (Common::String::iterator i = foo2.begin(); i != foo2.end(); ++i)
+ *i = 'h';
+
+ TS_ASSERT_EQUALS(foo1, "Hello");
+ TS_ASSERT_EQUALS(foo2, "hhhhh");
+ }
+
void test_self_asignment() {
Common::String foo1("12345678901234567890123456789012");
foo1 = foo1.c_str() + 2;
diff --git a/tools/create_msvc/create_msvc.cpp b/tools/create_msvc/create_msvc.cpp
index fcae638c50..1c395b01aa 100644
--- a/tools/create_msvc/create_msvc.cpp
+++ b/tools/create_msvc/create_msvc.cpp
@@ -512,8 +512,6 @@ int main(int argc, char *argv[]) {
// 4103 (alignment changed after including header, may be due to missing #pragma pack(pop))
// used by pack-start / pack-end
//
- // 4121 (alignment of a member was sensitive to packing)
- //
// 4127 (conditional expression is constant)
// used in a lot of engines
//
@@ -567,7 +565,6 @@ int main(int argc, char *argv[]) {
projectWarnings["lure"] = "4189;4355";
projectWarnings["kyra"] = "4355";
projectWarnings["m4"] = "4355";
- projectWarnings["mohawk"] = "4121";
ProjectProvider *provider = NULL;
diff --git a/tools/md5table.c b/tools/md5table.c
index cb2959ed88..7d76b7541d 100644
--- a/tools/md5table.c
+++ b/tools/md5table.c
@@ -222,7 +222,7 @@ int main(int argc, char *argv[])
const int entrySize = 256;
int numEntries = 0, maxEntries = 1;
- char *entriesBuffer = malloc(maxEntries * entrySize);
+ char *entriesBuffer = (char *)malloc(maxEntries * entrySize);
typedef enum {
kCPPOutput,
@@ -295,7 +295,7 @@ int main(int argc, char *argv[])
} else if (entry.md5) {
if (numEntries >= maxEntries) {
maxEntries *= 2;
- entriesBuffer = realloc(entriesBuffer, maxEntries * entrySize);
+ entriesBuffer = (char *)realloc(entriesBuffer, maxEntries * entrySize);
}
if (0 == strcmp(entry.variant, "-"))
entry.variant = "";
diff --git a/tools/module.mk b/tools/module.mk
index 5248454382..2c62e427ea 100644
--- a/tools/module.mk
+++ b/tools/module.mk
@@ -36,15 +36,15 @@ clean-tools:
tools/convbdf$(EXEEXT): $(srcdir)/tools/convbdf.c
$(QUIET)$(MKDIR) tools/$(DEPDIR)
- $(QUIET_LINK)$(CC) $(CFLAGS) -Wall -o $@ $<
+ $(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
tools/md5table$(EXEEXT): $(srcdir)/tools/md5table.c
$(QUIET)$(MKDIR) tools/$(DEPDIR)
- $(QUIET_LINK)$(CC) $(CFLAGS) -Wall -o $@ $<
+ $(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
tools/make-scumm-fontdata$(EXEEXT): $(srcdir)/tools/make-scumm-fontdata.c
$(QUIET)$(MKDIR) tools/$(DEPDIR)
- $(QUIET_LINK)$(CC) $(CFLAGS) -Wall -o $@ $<
+ $(QUIET_LINK)$(LD) $(CFLAGS) -Wall -o $@ $<
#
# Rules to explicitly rebuild the credits / MD5 tables.
diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt
index b379bc837e..c3e48d6c5a 100644
--- a/tools/scumm-md5.txt
+++ b/tools/scumm-md5.txt
@@ -591,6 +591,7 @@ catalog Humongous Interactive Catalog
airport Let's Explore the Airport with Buzzy
d6334a5a9b61afe18c368540fdf522ca -1 en Mac - - - Joachim Eberhard
07433205acdca3bc553d0e731588b35f -1 en Windows - - - Kirben
+ 3e861421f494711bc6f619d4aba60285 93231 ru Windows - - - sev
7ea2da67ebabea4ac20cee9f4f9d2934 -1 en Mac - Demo - khalek
8ffd618a776a4c0d8922bb28b09f8ce8 -1 en Windows - Demo - khalek
@@ -602,6 +603,7 @@ farm Let's Explore the Farm with Buzzy
a5c5388da9bf0e6662fdca8813a79d13 86962 en Windows - - - George Kormendi
a85856675429fe88051744f755b72f93 -1 en Windows - - - Kirben
a2386da005672cbd5136f4f27a626c5f 87061 nl Windows - - - George Kormendi
+ 5dda73606533d66a4c3f4f9ea6e842af 87061 ru Windows - - - sev
39fd6db10d0222d817025c4d3346e3b4 -1 en Mac - Demo - Joachim Eberhard
bf8b52fdd9a69c67f34e8e9fec72661c -1 en Windows HE 71 Demo - khalek, sev
@@ -713,6 +715,7 @@ puttmoon Putt-Putt Goes to the Moon
697c9b7c55a05d8199c48b48e379d2c8 -1 he DOS - - - sev
9dc02577bf50d4cfaf3de3fbac06fbe2 -1 en Mac - - - khalek
9c92eeaf517a31b7221ec2546ab669fd -1 en Windows HE 70 - - khalek
+ 3c4c471342bd95505a42334367d8f127 12161 ru Windows HE 70 - - sev
aa6a91b7f6f119d1b7b1f2a4c9e24d59 6233 en DOS - Demo -
4af4a6b248103c1fe9edef619677f540 -1 en Mac - Demo - khalek