trivial diff: fix warnings in mercury_builtin.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Apr 8 23:46:54 AEST 1998
Estimated hours taken: 0.25
library/mercury_builtin.m:
Fix a warning due to a type error in grades that don't use
non-local gotos: mercury__mercury_builtin__init should be
a function of type `void ()', not `ModuleFunc'.
Also avoid the use of nested extern declarations.
Index: mercury_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/mercury_builtin.m,v
retrieving revision 1.93
diff -u -u -r1.93 mercury_builtin.m
--- mercury_builtin.m 1998/02/25 00:11:53 1.93
+++ mercury_builtin.m 1998/04/02 12:18:36
@@ -657,10 +657,10 @@
/*
INIT sys_init_builtin_types_module
*/
+extern ModuleFunc builtin_types_module;
+extern void mercury__mercury_builtin__init(void);
void sys_init_builtin_types_module(void);
void sys_init_builtin_types_module(void) {
- extern ModuleFunc builtin_types_module;
- extern ModuleFunc mercury__mercury_builtin__init;
builtin_types_module();
@@ -726,13 +726,14 @@
END_MODULE
/* Ensure that the initialization code for the above module gets run. */
+
/*
INIT sys_init_unsafe_promise_unique_module
*/
+extern ModuleFunc unsafe_promise_unique_module;
void sys_init_unsafe_promise_unique_module(void);
/* extra declaration to suppress gcc -Wmissing-decl warning */
void sys_init_unsafe_promise_unique_module(void) {
- extern ModuleFunc unsafe_promise_unique_module;
unsafe_promise_unique_module();
}
@@ -808,13 +809,14 @@
END_MODULE
/* Ensure that the initialization code for the above module gets run. */
+
/*
INIT sys_init_copy_module
*/
+extern ModuleFunc copy_module;
void sys_init_copy_module(void);
/* extra declaration to suppress gcc -Wmissing-decl warning */
void sys_init_copy_module(void) {
- extern ModuleFunc copy_module;
copy_module();
}
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list