aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-02-28 16:06:32 +0000
committerJohannes Schickel2009-02-28 16:06:32 +0000
commit9cc4f5630e26d2dc474623635a6978210a7a16da (patch)
tree142b7a7a904759958069078f74b26472b7829d7e
parent1befd93475a8a92b55555a17752ccf68b7cd224c (diff)
downloadscummvm-rg350-9cc4f5630e26d2dc474623635a6978210a7a16da.tar.gz
scummvm-rg350-9cc4f5630e26d2dc474623635a6978210a7a16da.tar.bz2
scummvm-rg350-9cc4f5630e26d2dc474623635a6978210a7a16da.zip
Fix warnings.
svn-id: r38972
-rw-r--r--engines/sci/gfx/gfx_widgets.cpp6
-rw-r--r--engines/sci/gfx/resmgr.cpp5
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<void *>(value);
}
} else
return NULL;