[Scummvm-git-logs] scummvm-tools master -> 25a9d5c1e90daa2409df195518b701bd7d1719a5

aquadran noreply at scummvm.org
Sun May 29 06:26:51 UTC 2022


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

Summary:
25a9d5c1e9 ALL: Fixed several compiler warnings


Commit: 25a9d5c1e90daa2409df195518b701bd7d1719a5
    https://github.com/scummvm/scummvm-tools/commit/25a9d5c1e90daa2409df195518b701bd7d1719a5
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-05-29T08:26:48+02:00

Commit Message:
ALL: Fixed several compiler warnings

Changed paths:
    encode_dxa.cpp
    engines/grim/emi/til2bmp.cpp
    engines/grim/patchex/mszipd.cpp
    engines/mohawk/archive.h


diff --git a/encode_dxa.cpp b/encode_dxa.cpp
index c38c9bb..fd2320c 100644
--- a/encode_dxa.cpp
+++ b/encode_dxa.cpp
@@ -29,7 +29,7 @@
 
 const uint32 typeDEXA = 0x41584544;
 const uint32 typeFRAM = 0x4d415246;
-const uint32 typeWAVE = 0x45564157;
+//const uint32 typeWAVE = 0x45564157;
 const uint32 typeCMAP = 0x50414D43;
 const uint32 typeNULL = 0x4C4C554E;
 
diff --git a/engines/grim/emi/til2bmp.cpp b/engines/grim/emi/til2bmp.cpp
index b81d280..af85e50 100644
--- a/engines/grim/emi/til2bmp.cpp
+++ b/engines/grim/emi/til2bmp.cpp
@@ -241,11 +241,11 @@ LucasBitMap *MakeFullPicture(LucasBitMap **bits) {
 void ProcessFile(const char *_data, uint32_t size, std::string name) {
 	std::stringstream til;
 	uint32_t outsize = 0, bpp = 4;
-	Bytef *data = decompress((Bytef *)_data, size, outsize);
+	const char *data = (const char *)decompress((Bytef *)const_cast<char *>(_data), size, outsize);
 	if (!data) {
 		return;
 	}
-	til.write((const char *)data, outsize);
+	til.write(data, outsize);
 	delete[] data;
 	uint32_t id, bmoffset, rects, b, c, numImages;
 
@@ -260,7 +260,7 @@ void ProcessFile(const char *_data, uint32_t size, std::string name) {
 	til.read((char *)&c, 4);
 	c = FROM_LE_32(c);
 
-// We want to actually read numImages and bpp
+	// We want to actually read numImages and bpp
 	til.seekg(bmoffset + 16, std::ios::beg);
 	til.read((char *)&numImages, 4);
 	numImages = FROM_LE_32(numImages);
@@ -270,7 +270,7 @@ void ProcessFile(const char *_data, uint32_t size, std::string name) {
 	}
 
 	til.seekg(16, std::ios::cur);
-	til.read((char *) &bpp, 4);
+	til.read((char *)&bpp, 4);
 	bpp = FROM_LE_32(bpp);
 	bpp = bpp / 8;
 
diff --git a/engines/grim/patchex/mszipd.cpp b/engines/grim/patchex/mszipd.cpp
index 602da57..ae290b2 100644
--- a/engines/grim/patchex/mszipd.cpp
+++ b/engines/grim/patchex/mszipd.cpp
@@ -129,9 +129,9 @@ static int zipd_read_input(struct mszipd_stream *zip) {
 static int make_decode_table(unsigned int nsyms, unsigned int nbits,
 			     unsigned char *length, unsigned short *table)
 {
-  register unsigned int leaf, reverse, fill;
-  register unsigned short sym, next_sym;
-  register unsigned char bit_num;
+  unsigned int leaf, reverse, fill;
+  unsigned short sym, next_sym;
+  unsigned char bit_num;
   unsigned int pos         = 0;
   unsigned int table_mask  = 1 << nbits;
   unsigned int bmask    = table_mask >> 1;
@@ -208,8 +208,8 @@ static int make_decode_table(unsigned int nsyms, unsigned int nbits,
 } while (0)
 
 static int zip_read_lens(struct mszipd_stream *zip) {
-  register unsigned int bit_buffer;
-  register int bits_left;
+  unsigned int bit_buffer;
+  int bits_left;
   unsigned char *i_ptr, *i_end;
 
   unsigned short bl_table[(1 << 7)];
@@ -267,9 +267,9 @@ static int zip_read_lens(struct mszipd_stream *zip) {
 static int inflate(struct mszipd_stream *zip) {
   unsigned int last_block, block_type, distance, length, this_run, i;
 
-  register unsigned int bit_buffer;
-  register int bits_left;
-  register unsigned short sym;
+  unsigned int bit_buffer;
+  int bits_left;
+  unsigned short sym;
   unsigned char *i_ptr, *i_end;
 
   RESTORE_BITS;
@@ -483,8 +483,8 @@ struct mszipd_stream *mszipd_init(struct mspack_system *system,
 }
 
 int mszipd_decompress(struct mszipd_stream *zip, off_t out_bytes) {
-  register unsigned int bit_buffer;
-  register int bits_left;
+  unsigned int bit_buffer;
+  int bits_left;
   unsigned char *i_ptr, *i_end;
 
   int i, state, error;
diff --git a/engines/mohawk/archive.h b/engines/mohawk/archive.h
index 732ec37..a403529 100644
--- a/engines/mohawk/archive.h
+++ b/engines/mohawk/archive.h
@@ -209,12 +209,12 @@ protected:
 	FileTable *_fileTable;
 
 private:
-	bool _hasData;
+	//bool _hasData;
 	uint32 _fileSize;
 	RSRC_Header _rsrc;
 	Type *_types;
-	uint16 _nameTableAmount;
-	uint16 _resourceTableAmount;
+	//uint16 _nameTableAmount;
+	//uint16 _resourceTableAmount;
 	uint16 _fileTableAmount;
 
 	virtual int16 getTypeIndex(uint32 tag) {




More information about the Scummvm-git-logs mailing list