New DOM warnings [inkscape build report]
Some new warnings from the DOM code...
----- Forwarded message from root <root@...1070...> -----
Date: Fri, 14 Apr 2006 05:21:24 -0700 From: root <root@...1070...> To: inkscape-tester@lists.sourceforge.net Subject: [Inkscape-tester] inkscape build report
= Analysis Report for inkscape = Report Time: Fri Apr 14 04:37:05 2006 (Run 2115) Snapshot: inkscape-20060414-0300.tar.bz2 Status: finished
Platform Unpack Config Build Install WRNS ERRS ------------------------------------------------------------------------ debian x86 0 0 0 0 21 0
Test Status Score Info ------------------------------------------------------------------------ sut-1 ??
== Errors ==
none
== Warnings ==
sp-flowtext.cpp:339: warning: `sp_item_bbox_desktop' is deprecated (declared at sp-item.h:215) sp-item.cpp:744: warning: `sp_item_bbox_desktop' is deprecated (declared at sp-item.cpp:733) sp-shape.cpp:609: warning: `sp_item_bbox_desktop' is deprecated (declared at sp-item.h:215) sp-text.cpp:486: warning: `sp_item_bbox_desktop' is deprecated (declared at sp-item.h:215) dialogs/export.cpp:650: warning: `sp_item_bbox_desktop' is deprecated (declared at sp-item.h:215) dialogs/export.cpp:729: warning: `sp_item_bbox_desktop' is deprecated (declared at sp-item.h:215) display/canvas-arena.cpp:85: warning: invalid access to non-static data member `SPCanvasArenaClass::arena_event' of NULL object display/canvas-arena.cpp:85: warning: (perhaps the `offsetof' macro was used incorrectly) display/sp-canvas.cpp:132: warning: invalid access to non-static data member `SPCanvasItemClass::event' of NULL object display/sp-canvas.cpp:132: warning: (perhaps the `offsetof' macro was used incorrectly) dom/io/domstream.h:241: warning: `virtual void org::w3c::dom::io::BasicOutputStream::put(short unsigned int)' was hidden dom/io/base64stream.h:111: warning: by `virtual void org::w3c::dom::io::Base64OutputStream::put(int)' dom/io/domstream.h:241: warning: `virtual void org::w3c::dom::io::BasicOutputStream::put(short unsigned int)' was hidden dom/io/gzipstream.h:104: warning: by `virtual void org::w3c::dom::io::GzipOutputStream::put(int)' dom/util/ziptool.cpp:1542: warning: comparison between signed and unsigned integer expressions dom/util/ziptool.cpp:1665: warning: unused variable `int cm' dom/util/ziptool.cpp:1670: warning: unused variable `bool ftext' dom/util/ziptool.cpp:1683: warning: unused variable `time_t mtime' dom/util/ziptool.cpp:1688: warning: unused variable `int xfl' dom/util/ziptool.cpp:1693: warning: unused variable `int os' extension/internal/odf.cpp:188: warning: long unsigned int format, guint32 arg (arg 5)
== Environment Summary ==
------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&da... _______________________________________________ Inkscape-tester mailing list Inkscape-tester@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-tester
----- End forwarded message -----
Bryce Harrington wrote:
Some new warnings from the DOM code...
The first few are not DOM, sorry.
But I have a call like this, too, in odf.cpp: NR::Rect bbox = sp_item_bbox_desktop(item);
What is the new equivalent?
These have long been irritating. Maybe someone could just instantiate these guys, get the offests, and discard. Wasteful, but cleaner.
But these are mine. Got them. Thanks.
bob
Bob Jamison wrote:
Apparently not. It seems that g++ will issue this warning whenever offsetof() or GTK_SIGNAL_OFFSET() are used.
GTK_SIGNAL_OFFSET and GTK_STRUCT_OFFSET are based on this declaration:
#define G_STRUCT_OFFSET(struct_type, member) \ ((glong) ((guint8*) &((struct_type*) 0)->member))
Here is a gcc mailing list item regarding this: http://gcc.gnu.org/ml/gcc/2003-11/msg00279.html
To be a POD struct, there must not be any virtual members. I guess that the function pointers make the classes in question virtual.
===========================
struct SPCanvasArenaClass { SPCanvasItemClass parent_class;
gint (* arena_event) (SPCanvasArena *carena, NRArenaItem *item, GdkEvent *event); };
struct SPCanvasItemClass : public GtkObjectClass { void (* update) (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags);
void (* render) (SPCanvasItem *item, SPCanvasBuf *buf); double (* point) (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item);
int (* event) (SPCanvasItem *item, GdkEvent *event); };
=========================== I had hoped that something like
glong offset = (glong) (&(obj->arena_item) - obj);
would work, but apparently g++ catches that sneaky method also.
Can anyone think of anything?
The Apache module C api avoids this, by actually having a table that switches the calls to the redefinable functions characterizing the class.
Or maybe this is just legacy, and needs to be recast in libsigc++?
bob
participants (2)
-
Bob Jamison
-
Bryce Harrington