After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142663 - window.c, persistence.c, (void) in prototypes
window.c, persistence.c, (void) in prototypes
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
unspecified
Other All
: Normal minor
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-17 14:36 UTC by Morten Welinder
Modified: 2005-06-18 17:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Compilation fixes (4.31 KB, patch)
2004-05-17 14:37 UTC, Morten Welinder
none Details | Review

Description Morten Welinder 2004-05-17 14:36:07 UTC
These files do not compile pre-C99.  Also, they need some "const" work.
Patch coming up.
Comment 1 Morten Welinder 2004-05-17 14:37:40 UTC
Created attachment 27775 [details] [review]
Compilation fixes

Note: "void foo ();" is not a prototype.  It needs "void" to become one.
Comment 2 Morten Welinder 2004-05-17 14:38:50 UTC
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

Comment 3 Lars Clausen 2004-07-17 20:32:10 UTC
Applied most of patch (one const wasn't really).  Still many places that should
have (void), so leaving this open.
Comment 4 Hans Breuer 2004-12-10 22:31:23 UTC
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 5 Hans Breuer 2005-01-28 18:19:57 UTC
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
Comment 6 Hans Breuer 2005-06-18 17:25:35 UTC
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.