From 0d7552b26e89bf8f5dc0690e35889f582b9ffb01 Mon Sep 17 00:00:00 2001 From: Ralf Stephan Date: Tue, 30 May 2006 10:06:47 +0000 Subject: removing some gcc4.1 warnings the right way (bzr r1082) --- src/text-context.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index 641d8bce2..964588794 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -1356,9 +1356,11 @@ sp_text_context_style_query(SPStyle *style, int property, SPTextContext *tc) if (!begin_it.prevCharacter()) end_it.nextCharacter(); for (Inkscape::Text::Layout::iterator it = begin_it ; it < end_it ; it.nextStartOfSpan()) { - SPObject const *pos_obj = NULL; - layout->getSourceOfCharacter(it, (void**)&pos_obj); - if (pos_obj == NULL) continue; + SPObject const *pos_obj = 0; + void *rawptr = 0; + layout->getSourceOfCharacter(it, &rawptr); + pos_obj = SP_OBJECT(rawptr); + if (pos_obj == 0) continue; while (SP_OBJECT_STYLE(pos_obj) == NULL && SP_OBJECT_PARENT(pos_obj)) pos_obj = SP_OBJECT_PARENT(pos_obj); // SPStrings don't have style styles_list = g_slist_prepend(styles_list, (gpointer)pos_obj); -- cgit v1.2.3