[Scummvm-cvs-logs] SF.net SVN: scummvm:[38331] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Feb 16 00:49:42 CET 2009


Revision: 38331
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38331&view=rev
Author:   fingolfin
Date:     2009-02-15 23:49:42 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Fixed more warnings (and at least one case of uninited data)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/scriptconsole.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
    scummvm/trunk/engines/sci/include/scitypes.h

Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-15 23:39:31 UTC (rev 38330)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-15 23:49:42 UTC (rev 38331)
@@ -43,8 +43,8 @@
 static int c_print(struct _state *s); /* prints a variable */
 static int c_size(struct _state *s); /* displays the size of a resource */
 static int c_dump(struct _state *s); /* gives a hex dump of a resource */
-static int c_objinfo(struct _state *s); /* shows some info about one class */
-static int c_objmethods(struct _state *s); /* Disassembles all methods of a class */
+//static int c_objinfo(struct _state *s); /* shows some info about one class */
+//static int c_objmethods(struct _state *s); /* Disassembles all methods of a class */
 static int c_hexgrep(struct _state *s); /* Searches a string in one resource or resource class */
 static int c_selectornames(struct _state *s); /* Displays all selector names */
 static int c_kernelnames(struct _state *s); /* Displays all kernel function names */

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-15 23:39:31 UTC (rev 38330)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-15 23:49:42 UTC (rev 38331)
@@ -254,7 +254,6 @@
 	if (driver->mode->palette &&
 	        (!(pxm->flags & GFX_PIXMAP_FLAG_PALETTE_SET))) {
 		int i;
-		int error;
 
 		for (i = 0; i < pxm->colors_nr; i++) {
 			if ((error = driver->set_palette(driver, pxm->colors[i].global_index,
@@ -806,7 +805,7 @@
 int
 gfxop_set_color(gfx_state_t *state, gfx_color_t *color, int r, int g, int b, int a,
                 int priority, int control) {
-	gfx_pixmap_color_t pixmap_color = {0};
+	gfx_pixmap_color_t pixmap_color = {0, 0, 0, 0};
 	int error_code;
 	int mask = ((r >= 0 && g >= 0 && b >= 0) ? GFX_MASK_VISUAL : 0)
 	           | ((priority >= 0) ? GFX_MASK_PRIORITY : 0)
@@ -872,8 +871,8 @@
 
 int
 gfxop_free_color(gfx_state_t *state, gfx_color_t *color) {
-	gfx_palette_color_t *palette_color	= {0};
-	gfx_pixmap_color_t pixmap_color		= {0};
+	gfx_palette_color_t *palette_color	= 0;
+	gfx_pixmap_color_t pixmap_color		= {0, 0, 0, 0};
 	int error_code;
 	BASIC_CHECKS(GFX_FATAL);
 
@@ -1231,7 +1230,6 @@
 	float mod_offset = 0.0, mod_breadth = 1.0; /* 0.0 to 1.0: Color adjustment */
 	gfx_rectangle_fill_t driver_shade_type;
 	rect_t new_box;
-	gfx_color_t draw_color1, draw_color2	= {{0, 0, 0}, 0, 0, 0, 0};
 
 	BASIC_CHECKS(GFX_FATAL);
 	REMOVE_POINTER;
@@ -1304,6 +1302,9 @@
 			return GFX_ERROR;
 		}
 
+		gfx_color_t draw_color1 = {{0, 0, 0, 0}, 0, 0, 0, 0};
+		gfx_color_t draw_color2 = {{0, 0, 0, 0}, 0, 0, 0, 0};
+
 		draw_color1.mask = draw_color2.mask = color1.mask;
 		draw_color1.priority = draw_color2.priority = color1.priority;
 
@@ -1540,8 +1541,8 @@
 
 int
 _gfxop_set_pointer(gfx_state_t *state, gfx_pixmap_t *pxm) {
-	rect_t old_pointer_bounds = {0};
-	rect_t pointer_bounds = {0};
+	rect_t old_pointer_bounds = {0, 0, 0, 0};
+	rect_t pointer_bounds = {0, 0, 0, 0};
 	int retval = -1;
 	int draw_old;
 	int draw_new = 0;
@@ -1817,7 +1818,7 @@
 
 sci_event_t
 gfxop_get_event(gfx_state_t *state, unsigned int mask) {
-	sci_event_t error_event = { SCI_EVT_ERROR, 0, 0 };
+	sci_event_t error_event = { SCI_EVT_ERROR, 0, 0, 0 };
 	sci_event_t event;
 	event.data = 0;
 	event.buckybits = 0;
@@ -2209,10 +2210,10 @@
                gfx_alignment_t halign, gfx_alignment_t valign,
                gfx_color_t color1, gfx_color_t color2, gfx_color_t bg_color,
                int flags) {
-	gfx_text_handle_t *handle			= {0};
-	gfx_bitmap_font_t *font				= {0};
+	gfx_text_handle_t *handle;
+	gfx_bitmap_font_t *font;
 	int i;
-	gfx_pixmap_color_t pxm_col1, pxm_col2, pxm_colbg = {0};
+	gfx_pixmap_color_t pxm_col1, pxm_col2, pxm_colbg;
 	BASIC_CHECKS(NULL);
 
 	COL_XLATE(pxm_col1, color1);

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-02-15 23:39:31 UTC (rev 38330)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-02-15 23:49:42 UTC (rev 38331)
@@ -262,7 +262,7 @@
 		break;
 
 	default:
-		GFX_DEBUG("Unsupported resource %d\n", type);
+		GFXDEBUG("Unsupported resource %d\n", type);
 		return NULL; /* unsupported resource */
 
 	}
@@ -308,7 +308,7 @@
 		return gfxr_read_pal1(res->id, colors_nr, res->data, res->size);
 	case SCI_VERSION_1_1 :
 	case SCI_VERSION_32 :
-		GFX_DEBUG("Palettes are not yet supported in this SCI version\n");
+		GFXDEBUG("Palettes are not yet supported in this SCI version\n");
 		return NULL;
 
 	default:

Modified: scummvm/trunk/engines/sci/include/scitypes.h
===================================================================
--- scummvm/trunk/engines/sci/include/scitypes.h	2009-02-15 23:39:31 UTC (rev 38330)
+++ scummvm/trunk/engines/sci/include/scitypes.h	2009-02-15 23:49:42 UTC (rev 38331)
@@ -35,8 +35,6 @@
 #include <dirent.h>
 #else
 #include <io.h>
-#	undef inline /* just to be sure it is not defined */
-#	define inline __inline
 #endif
 
 typedef int8 gint8;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list