[Scummvm-git-logs] scummvm-tools master -> 9460a8bcfa2963f8f0bc32e89957ff8976c06201
ccawley2011
ccawley2011 at gmail.com
Sun Aug 16 21:52:33 UTC 2020
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .
Summary:
c68daa840b CRYO: Fix incorrectly named define
54eef2a8d2 KYRA: Fix -Wclass-memaccess warnings
0b467e4e94 KYRA: Fix -Wcast-qual warning
9460a8bcfa TOOLS: Fix -Wsign-compare warnings
Commit: c68daa840b87afe815447fdb9c3d7ff2e249be93
https://github.com/scummvm/scummvm-tools/commit/c68daa840b87afe815447fdb9c3d7ff2e249be93
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-08-16T22:16:28+01:00
Commit Message:
CRYO: Fix incorrectly named define
Changed paths:
engines/cryo/extract_cryo.cpp
engines/cryo/extract_cryo.h
diff --git a/engines/cryo/extract_cryo.cpp b/engines/cryo/extract_cryo.cpp
index 9efc94500..1bdbf4b35 100644
--- a/engines/cryo/extract_cryo.cpp
+++ b/engines/cryo/extract_cryo.cpp
@@ -43,7 +43,7 @@ void ExtractCryo::execute() {
error("Unable to open %s", filename.getFullName().c_str());
Common::File fOut;
- for (Common::Array<DATEntry *>::iterator it = _dir.begin(); it != _dir.end(); ++it) {
+ for (DATIterator it = _dir.begin(); it != _dir.end(); ++it) {
byte *buffer = (byte *)malloc((*it)->size);
_datFile.seek((*it)->offset, SEEK_SET);
_datFile.read_noThrow(buffer, (*it)->size);
diff --git a/engines/cryo/extract_cryo.h b/engines/cryo/extract_cryo.h
index f726d243d..7cc32c569 100644
--- a/engines/cryo/extract_cryo.h
+++ b/engines/cryo/extract_cryo.h
@@ -32,7 +32,7 @@ struct DATEntry {
char flag;
};
-#define MPCIterator Common::Array<DATEntry *>::iterator
+#define DATIterator Common::Array<DATEntry *>::iterator
class ExtractCryo : public Tool {
public:
Commit: 54eef2a8d225833e376599f4df29523667d3bf64
https://github.com/scummvm/scummvm-tools/commit/54eef2a8d225833e376599f4df29523667d3bf64
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-08-16T22:20:06+01:00
Commit Message:
KYRA: Fix -Wclass-memaccess warnings
Changed paths:
engines/kyra/kyra_ins.cpp
engines/kyra/kyra_ins.h
diff --git a/engines/kyra/kyra_ins.cpp b/engines/kyra/kyra_ins.cpp
index c5983c5a7..f41601ec3 100644
--- a/engines/kyra/kyra_ins.cpp
+++ b/engines/kyra/kyra_ins.cpp
@@ -460,7 +460,6 @@ HoFInstaller::HoFInstaller(const char *baseFilename) : _list(0), _files(0) {
bool startFile = true;
_list = new Archive;
- memset(_list, 0, sizeof(Archive));
Archive *newArchive = _list;
for (int8 currentFile = 1; currentFile; currentFile++) {
@@ -505,7 +504,6 @@ HoFInstaller::HoFInstaller(const char *baseFilename) : _list(0), _files(0) {
newArchive->next = new Archive;
newArchive = newArchive->next;
- memset(newArchive, 0, sizeof(Archive));
currentFile = -1;
} else {
pos = 0;
@@ -518,7 +516,6 @@ HoFInstaller::HoFInstaller(const char *baseFilename) : _list(0), _files(0) {
newArchive->next = new Archive;
newArchive = newArchive->next;
- memset(newArchive, 0, sizeof(Archive));
}
}
diff --git a/engines/kyra/kyra_ins.h b/engines/kyra/kyra_ins.h
index 9b1c0dd3c..9cd37313e 100644
--- a/engines/kyra/kyra_ins.h
+++ b/engines/kyra/kyra_ins.h
@@ -34,7 +34,7 @@ private:
char _baseFilename[1024];
struct Archive {
- Archive() : next(0) {}
+ Archive() : next(0), firstFile(0), startOffset(0), lastFile(0), endOffset(0), totalSize(0) { memset(filename, 0, sizeof(filename)); }
~Archive() { delete next; next = 0; }
char filename[1024];
Commit: 0b467e4e94ab9ece57d7f1b0c3410bb638a3dec0
https://github.com/scummvm/scummvm-tools/commit/0b467e4e94ab9ece57d7f1b0c3410bb638a3dec0
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-08-16T22:40:45+01:00
Commit Message:
KYRA: Fix -Wcast-qual warning
Changed paths:
engines/kyra/kyra_ins.cpp
diff --git a/engines/kyra/kyra_ins.cpp b/engines/kyra/kyra_ins.cpp
index f41601ec3..39267d34c 100644
--- a/engines/kyra/kyra_ins.cpp
+++ b/engines/kyra/kyra_ins.cpp
@@ -316,7 +316,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt) {
const uint8 *tbl1 = _tables[srcIndex];
uint8 *tbl2 = _tables[dstIndex];
- const uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2];
+ uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2];
if (!cnt)
return;
Commit: 9460a8bcfa2963f8f0bc32e89957ff8976c06201
https://github.com/scummvm/scummvm-tools/commit/9460a8bcfa2963f8f0bc32e89957ff8976c06201
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-08-16T22:51:30+01:00
Commit Message:
TOOLS: Fix -Wsign-compare warnings
Changed paths:
engines/hdb/extract_hdb.h
engines/mohawk/utils.cpp
engines/prince/deprince.cpp
diff --git a/engines/hdb/extract_hdb.h b/engines/hdb/extract_hdb.h
index 8917c0799..0a4fd6ba8 100644
--- a/engines/hdb/extract_hdb.h
+++ b/engines/hdb/extract_hdb.h
@@ -40,7 +40,7 @@ struct MPCEntry {
char filename[64]; // filename
int32 offset; // offset in MSD file of data
int32 length; // compressed length of data
- int32 ulength; // uncompressed length
+ uint32 ulength; // uncompressed length
DataType type; // type of data
};
diff --git a/engines/mohawk/utils.cpp b/engines/mohawk/utils.cpp
index 8e8680eab..e54862408 100644
--- a/engines/mohawk/utils.cpp
+++ b/engines/mohawk/utils.cpp
@@ -49,7 +49,7 @@ void copyBytes(Common::File *src, Common::File *outputFile, uint32 bytesToCopy)
}
void adjustQuickTimeAtomOffsets(Common::File *src, uint32 parentSize, int32 offset, Common::File *outputFile) {
- static const int kAtomHeaderSize = sizeof(uint32) + sizeof(uint32); // size, type
+ static const uint32 kAtomHeaderSize = sizeof(uint32) + sizeof(uint32); // size, type
uint32 totalSize = 0;
while (totalSize + kAtomHeaderSize < parentSize) {
diff --git a/engines/prince/deprince.cpp b/engines/prince/deprince.cpp
index a39a6f1be..45258b14d 100644
--- a/engines/prince/deprince.cpp
+++ b/engines/prince/deprince.cpp
@@ -825,7 +825,7 @@ int main(int argc, char *argv[]) {
int nlabel = 1;
// Heuristics to decompile the rest
- for (int i = 0; i < dataLen; i++) {
+ for (uint32 i = 0; i < dataLen; i++) {
if (!dataMark[i]) {
if (i > 53000 && i < 124348 && READ_LE_UINT16(&data[i]) < 244) {
sprintf(buf, "unused%d", (modeRenum ? nlabel : i));
@@ -966,7 +966,7 @@ int main(int argc, char *argv[]) {
for (const char **p = pref; *p; p++) {
int nn = 1;
- for (int i = 0; i < dataLen; i++) {
+ for (uint32 i = 0; i < dataLen; i++) {
if (!labels[i].empty() && labels[i].hasPrefix(*p)) {
sprintf(buf, "%s%d", *p, nn);
labels[i] = buf;
@@ -981,7 +981,7 @@ int main(int argc, char *argv[]) {
nlabel = 1;
- for (int i = 0; i < dataLen; i++) {
+ for (uint32 i = 0; i < dataLen; i++) {
if (!labels[i].empty() && !labels[i].hasPrefix("backanim")) {
if (inDB) {
printf("\n\n");
More information about the Scummvm-git-logs
mailing list