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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Feb 15 15:52:51 CET 2009


Revision: 38247
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38247&view=rev
Author:   thebluegr
Date:     2009-02-15 14:52:51 +0000 (Sun, 15 Feb 2009)

Log Message:
-----------
Fixed compilation under MSVC, and silenced some more warnings

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/klists.cpp
    scummvm/trunk/engines/sci/engine/scriptconsole.cpp
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/gfx/menubar.cpp
    scummvm/trunk/engines/sci/scicore/versions.cpp

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2009-02-15 14:49:01 UTC (rev 38246)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2009-02-15 14:52:51 UTC (rev 38247)
@@ -124,7 +124,7 @@
 sane_nodep(state_t *s, reg_t addr)
 {
 	int have_prev = 0;
-	reg_t prev;
+	reg_t prev = addr;
 
 	do {
 		node_t *node = LOOKUP_NODE(addr);

Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-15 14:49:01 UTC (rev 38246)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-15 14:52:51 UTC (rev 38247)
@@ -395,7 +395,7 @@
 	} else if (*str == '&') {
 		int script_nr;
 		/* Look up by script ID */
-		char *colon = strchr(str, ':');
+		char *colon = (char *)strchr(str, ':');
 
 		if (!colon)
 			return 1;
@@ -422,8 +422,8 @@
 		int i;
 		/* Parse obj by name */
 
-		tmp = strchr(str, '+');
-		str_suffix = strchr(str, '-');
+		tmp = (char *)strchr(str, '+');
+		str_suffix = (char *)strchr(str, '-');
 		if (tmp < str_suffix)
 			str_suffix = tmp;
 		if (str_suffix) {
@@ -431,7 +431,7 @@
 			*str_suffix = 0;
 		}
 
-		tmp = strchr(str, '.');
+		tmp = (char *)strchr(str, '.');
 
 		if (tmp) {
 			*tmp = 0;
@@ -514,7 +514,7 @@
 			*str_suffix = suffchar;
 		rel_offsetting = 1;
 	} else {
-		char *colon = strchr(str, ':');
+		char *colon = (char *)strchr(str, ':');
 
 		if (!colon) {
 			offsetting = str;

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-15 14:49:01 UTC (rev 38246)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-15 14:52:51 UTC (rev 38247)
@@ -773,7 +773,7 @@
 			sciprintf("[%04x] ", nr);
 			_c_single_seg_info(s, s->seg_manager.heap[nr]);
 		}
-	} else for (i = 0; i < s->seg_manager.heap_size; i++)
+	} else for (i = 0; i < (unsigned int) s->seg_manager.heap_size; i++)
 			if (s->seg_manager.heap[i]) {
 				sciprintf("[%04x] ", i);
 				_c_single_seg_info(s, s->seg_manager.heap[i]);
@@ -1573,7 +1573,7 @@
 			while (stackframe > 0) {
 				int argc = sb[- stackframe + 1].offset;
 				const char *name = NULL;
-				reg_t called_obj_addr;
+				reg_t called_obj_addr = *p_objp;
 
 				if (opcode == op_send)
 					called_obj_addr = s->r_acc;

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-15 14:49:01 UTC (rev 38246)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-15 14:52:51 UTC (rev 38247)
@@ -577,7 +577,7 @@
 
 	switch( mem_type ) {
 	case MEM_OBJ_SCRIPT:
-		VERIFY( reg.offset + 1 < mem_obj->data.script.buf_size, "invalid offset\n" );
+		VERIFY( reg.offset + 1 < (unsigned int)mem_obj->data.script.buf_size, "invalid offset\n" );
 		return (unsigned char)mem_obj->data.script.buf[reg.offset] |
 		     ( ((unsigned char)mem_obj->data.script.buf[reg.offset+1]) << 8 );
 	case MEM_OBJ_CLONES:

Modified: scummvm/trunk/engines/sci/gfx/menubar.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-02-15 14:49:01 UTC (rev 38246)
+++ scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-02-15 14:52:51 UTC (rev 38247)
@@ -163,7 +163,7 @@
 	menu_t *menu;
 	char tracker;
 	char *left = NULL, *right;
-	reg_t left_origin;
+	reg_t left_origin = entries_base;
 	int string_len = 0;
 	int tag = 0, c_width, max_width = 0;
 	int height;

Modified: scummvm/trunk/engines/sci/scicore/versions.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/versions.cpp	2009-02-15 14:49:01 UTC (rev 38246)
+++ scummvm/trunk/engines/sci/scicore/versions.cpp	2009-02-15 14:52:51 UTC (rev 38247)
@@ -354,7 +354,7 @@
 	*code = hash_code;
 
 	for (i = 0 ; sci_games[i].name ; i++) {
-		if (sci_games[i].id == hash_code) {
+		if ((unsigned int)sci_games[i].id == hash_code) {
 			*result = sci_games[i].version;
 			*res_version = sci_games[i].res_version;
 			return sci_games[i].name;


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