From 9cc4f5630e26d2dc474623635a6978210a7a16da Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 28 Feb 2009 16:06:32 +0000 Subject: Fix warnings. svn-id: r38972 --- engines/sci/gfx/gfx_widgets.cpp | 6 +++--- engines/sci/gfx/resmgr.cpp | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/engines/sci/gfx/gfx_widgets.cpp b/engines/sci/gfx/gfx_widgets.cpp index f20e3d8a53..13dba23c36 100644 --- a/engines/sci/gfx/gfx_widgets.cpp +++ b/engines/sci/gfx/gfx_widgets.cpp @@ -676,7 +676,7 @@ static int _w_gfxwop_view_print(gfxw_widget_t *widget, const char *name, int ind 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 @@ static int _gfxwop_some_view_print(gfxw_widget_t *widget, int indentation, const _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 int _gfxwop_sorted_list_draw(gfxw_widget_t *list, Common::Point pos) { 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); } diff --git a/engines/sci/gfx/resmgr.cpp b/engines/sci/gfx/resmgr.cpp index 7598d2a98e..dba08fef2e 100644 --- a/engines/sci/gfx/resmgr.cpp +++ b/engines/sci/gfx/resmgr.cpp @@ -161,7 +161,10 @@ void *gfxr_sbtree_free_tagged_func(sbtree_t *tree, const int key, const void *va 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(value); } } else return NULL; -- cgit v1.2.3