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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Feb 28 17:06:32 CET 2009


Revision: 38972
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38972&view=rev
Author:   lordhoto
Date:     2009-02-28 16:06:32 +0000 (Sat, 28 Feb 2009)

Log Message:
-----------
Fix warnings.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
    scummvm/trunk/engines/sci/gfx/resmgr.cpp

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-02-28 15:51:30 UTC (rev 38971)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-02-28 16:06:32 UTC (rev 38972)
@@ -676,7 +676,7 @@
 	gfxw_view_t *view = (gfxw_view_t *)widget;
 	_gfxw_print_widget(widget, indentation);
 
-	sciprintf(name);
+	sciprintf("%s", name);
 	sciprintf("(%d/%d/%d)@(%d,%d)[p:%d,c:%d]", view->view, view->loop, view->cel, view->pos.x, view->pos.y,
 	          (view->color.mask & GFX_MASK_PRIORITY) ? view->color.priority : -1,
 	          (view->color.mask & GFX_MASK_CONTROL) ? view->color.control : -1);
@@ -767,7 +767,7 @@
 
 	_gfxw_print_widget(widget, indentation);
 
-	sciprintf(type_string);
+	sciprintf("%s", type_string);
 	sciprintf(" SORT=%d z=%d seq=%d (%d/%d/%d)@(%d,%d)[p:%d,c:%d]; sig[%04x@%p]", view->force_precedence, view->z,
 	          view->sequence, view->view, view->loop, view->cel, view->pos.x, view->pos.y,
 	          (view->color.mask & GFX_MASK_PRIORITY) ? view->color.priority : -1,
@@ -1388,7 +1388,7 @@
 
 static inline int _w_gfxwop_list_print(gfxw_widget_t *list, const char *name, int indentation) {
 	_gfxw_print_widget(list, indentation);
-	sciprintf(name);
+	sciprintf("%s", name);
 
 	return _w_gfxwop_container_print(list, indentation);
 }

Modified: scummvm/trunk/engines/sci/gfx/resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resmgr.cpp	2009-02-28 15:51:30 UTC (rev 38971)
+++ scummvm/trunk/engines/sci/gfx/resmgr.cpp	2009-02-28 16:06:32 UTC (rev 38972)
@@ -161,7 +161,10 @@
 				resource->lock_sequence_nr = 0;
 			else
 				(resource->lock_sequence_nr)--;
-			return (void *) value;
+			// FIXME: const_cast does not sound like a good idea,
+			// maybe we should just make the value parameter
+			// non const instead?
+			return const_cast<void *>(value);
 		}
 	} else
 		return NULL;


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