GNOME Bugzilla – Bug 142663
window.c, persistence.c, (void) in prototypes
Last modified: 2005-06-18 17:25:35 UTC
These files do not compile pre-C99. Also, they need some "const" work. Patch coming up.
Created attachment 27775 [details] [review] Compilation fixes Note: "void foo ();" is not a prototype. It needs "void" to become one.
I'm not sure if the hash tables' keys need to be strdup'd. If one were to close a window, I don't think the keys would remain valid. persistence.c: In function `persistence_update_window': persistence.c:544: warning: passing arg 2 of `g_hash_table_insert' discards qualifiers from pointer target type persistence.c: In function `persistence_register_window': persistence.c:581: warning: passing arg 2 of `g_hash_table_insert' discards qualifiers from pointer target type persistence.c: In function `persistence_register_list': persistence.c:711: warning: passing arg 2 of `g_hash_table_insert' discards qualifiers from pointer target type
Applied most of patch (one const wasn't really). Still many places that should have (void), so leaving this open.
At least it compiles with -ansi again. 2004-12-10 Hans Breuer <hans@breuer.org> * **/*.c : fixed a bunch of warnings, not only for -ansi (still too many of them, but -ansi works) lib/ prop_geomtypes.h prop_geomtypes.c:306: warning: static declaration for `fontsizeprop_reset_widget' follows non-static dia_dirs.c:196: warning: return discards qualifiers from pointer target type objects/custom/ shape_info.c:121: warning: static declaration for `parse_path' follows non-static objects/SADT/ arrow.c:228: warning: `draw_arrowhead' declared `static' but never defined arrow.c:244: warning: unused variable `i' arrow.c:245: warning: unused variable `p' arrow.c:246: warning: unused variable `zzr' object/Istar/*.c object/Jackson/*.c object/KAOS/*.c : finally removed c++ comments objects/Istar/goal.c : initialize connections::directions while I was there - helps autorouting * objects/KAOS/metaandorrel.c objects/Istar/link.c objects/KAOS/metabinrel.c : removed struct _DiaImage hack (it would be quite simple to add image-from-memory support to lib/ if needed) * pydia-*.h : warning: no newline at end of file * plug-ins/gprint/diagnomeprint.c : allow to unregister and follow new unique name naming convention * plug-ins/gprint/diagnomeprintrenderer.c : no c++ comments here either
Comment on attachment 27775 [details] [review] Compilation fixes Marking the patch as obsolete to get this from the not-reviewed-patches-reminder-list (it is fixed by my commit mentioned above). Leaving the bug open cause I'm uncertain about missing voids
2005-06-18 Hans Breuer <hans@breuer.org> * app/textedit.[hc] lib/arrows.[hc] plug-ins/xslt/xslt.h plug-ins/xslt/xsltdialog.c plug-ins/xslt/xslt.c : fix for sloppiness in function declarations. 'f();' for a function without parameters is a C++ism. Though I can't get any of my compilers to warn about it. Finally fixes bug #142663.