[Scummvm-cvs-logs] scummvm-tools master -> 9bf00dee1d5f1206d8a4cbd1129ed1540a4da9d9

digitall dgturner at iee.org
Tue Nov 27 02:57:26 CET 2012


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:
9bf00dee1d TOOLS: Fix some set-not-used variable compiler warnings.


Commit: 9bf00dee1d5f1206d8a4cbd1129ed1540a4da9d9
    https://github.com/scummvm/scummvm-tools/commit/9bf00dee1d5f1206d8a4cbd1129ed1540a4da9d9
Author: D G Turner (digitall at scummvm.org)
Date: 2012-11-26T17:55:18-08:00

Commit Message:
TOOLS: Fix some set-not-used variable compiler warnings.

Changed paths:
    encode_dxa.cpp
    engines/scumm/extract_loom_tg16.cpp



diff --git a/encode_dxa.cpp b/encode_dxa.cpp
index 9e7aa69..931edfb 100644
--- a/encode_dxa.cpp
+++ b/encode_dxa.cpp
@@ -647,11 +647,9 @@ int EncodeDXA::read_png_file(const char* filename, unsigned char *&image, unsign
 	png_byte header[8];
 
 	png_byte color_type;
-	png_byte bit_depth;
 
 	png_structp png_ptr;
 	png_infop info_ptr;
-	int number_of_passes;
 	png_bytep *row_pointers;
 	png_size_t rowbytes;
 
@@ -681,14 +679,14 @@ int EncodeDXA::read_png_file(const char* filename, unsigned char *&image, unsign
 	width = png_get_image_width(png_ptr, info_ptr);
 	height = png_get_image_height(png_ptr, info_ptr);
 	color_type = png_get_color_type(png_ptr, info_ptr);
-	bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+	/*png_byte bit_depth =*/ png_get_bit_depth(png_ptr, info_ptr);
 
 	if (color_type != PNG_COLOR_TYPE_PALETTE) {
 		palette = NULL;
 		return 2;
 	}
 
-	number_of_passes = png_set_interlace_handling(png_ptr);
+	/*int number_of_passes =*/ png_set_interlace_handling(png_ptr);
 	png_read_update_info(png_ptr, info_ptr);
 
 	// read file
diff --git a/engines/scumm/extract_loom_tg16.cpp b/engines/scumm/extract_loom_tg16.cpp
index 58e588f..286eefe 100644
--- a/engines/scumm/extract_loom_tg16.cpp
+++ b/engines/scumm/extract_loom_tg16.cpp
@@ -699,7 +699,7 @@ void ExtractLoomTG16::extract_resource(Common::File &input, Common::File &output
 	uint16 j;
 #endif
 	uint32 i, rlen;
-	uint8 junk, rtype, rid;
+	uint8 junk = 0, rtype = 0, rid = 0;
 
 	if (res == NULL)
 		error("extract_resource - no resource specified");
@@ -986,6 +986,7 @@ void ExtractLoomTG16::extract_resource(Common::File &input, Common::File &output
 	default:
 		warning("extract_resource - unknown resource type %d specified", res->type);
 	}
+	print("Unknown/unused fields: junk=%d, rtype=%d, rid=%d", junk, rtype, rid);
 }
 
 #ifdef MAKE_LFLS






More information about the Scummvm-git-logs mailing list