[m-dev.] diff: more gcc 2.95 warning fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Nov 15 10:22:46 AEDT 1999


Estimated hours taken: 0.5

library/array.m:
library/builtin.m:
library/private_builtin.m:
library/std_util.m:
runtime/mercury_bootstrap.c:
runtime/mercury_memory_zones.c:
	Fix gcc 2.95 warnings about "non-static declaration follows static".

Workspace: /d-drive/home/hg/fjh/mercury
Index: library/array.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/array.m,v
retrieving revision 1.63
diff -u -d -r1.63 array.m
--- library/array.m	1999/10/20 07:03:09	1.63
+++ library/array.m	1999/11/14 22:04:29
@@ -340,7 +340,7 @@
 INIT sys_init_array_module_builtins
 */
 
-extern ModuleFunc array_module_builtins;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc array_module_builtins;
 
 void sys_init_array_module_builtins(void);
 		/* suppress gcc -Wmissing-decl warning */
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.24
diff -u -d -r1.24 builtin.m
--- library/builtin.m	1999/10/26 14:41:18	1.24
+++ library/builtin.m	1999/11/14 22:05:17
@@ -745,7 +745,7 @@
 /*
 INIT sys_init_builtin_types_module
 */
-extern ModuleFunc builtin_types_module;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc builtin_types_module;
 extern void mercury__private_builtin__init(void);
 void sys_init_builtin_types_module(void);
 void sys_init_builtin_types_module(void) {
@@ -844,7 +844,7 @@
 /*
 INIT sys_init_copy_module
 */
-extern ModuleFunc copy_module;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc copy_module;
 void sys_init_copy_module(void);
 	/* extra declaration to suppress gcc -Wmissing-decl warning */
 void sys_init_copy_module(void) {
@@ -935,7 +935,7 @@
 */
 
 
-extern ModuleFunc unify_c_pointer_module;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc unify_c_pointer_module;
 void sys_init_unify_c_pointer_module(void);
 	/* duplicate declaration to suppress gcc -Wmissing-decl warning */
 void sys_init_unify_c_pointer_module(void) {
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.31
diff -u -d -r1.31 private_builtin.m
--- library/private_builtin.m	1999/10/20 07:03:12	1.31
+++ library/private_builtin.m	1999/11/14 22:12:24
@@ -480,7 +480,7 @@
 /*
 INIT sys_init_type_info_module
 */
-extern ModuleFunc type_info_module;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc type_info_module;
 void sys_init_type_info_module(void); /* suppress gcc -Wmissing-decl warning */
 void sys_init_type_info_module(void) {
 	type_info_module();
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.169
diff -u -d -r1.169 std_util.m
--- library/std_util.m	1999/10/28 06:22:49	1.169
+++ library/std_util.m	1999/11/14 22:06:47
@@ -1212,7 +1212,7 @@
 /*
 INIT sys_init_unify_univ_module
 */
-extern ModuleFunc unify_univ_module;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc unify_univ_module;
 void sys_init_unify_univ_module(void); /* suppress gcc -Wmissing-decl warning */
 void sys_init_unify_univ_module(void) {
 	unify_univ_module();
@@ -1717,7 +1717,7 @@
 	** calls to this function.
 	*/
 
-int 
+static int 
 ML_get_functor_info(Word type_info, int functor_number, ML_Construct_Info *info)
 {
 	Word *type_ctor_functors;
Index: runtime/mercury_bootstrap.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.c,v
retrieving revision 1.21
diff -u -d -r1.21 mercury_bootstrap.c
--- runtime/mercury_bootstrap.c	1999/10/20 07:03:20	1.21
+++ runtime/mercury_bootstrap.c	1999/11/14 22:07:09
@@ -118,7 +118,7 @@
 /*
 INIT sys_init_unify_univ_module_bootstrap
 */
-extern ModuleFunc unify_univ_module_bootstrap;
+MR_MODULE_STATIC_OR_EXTERN ModuleFunc unify_univ_module_bootstrap;
 void sys_init_unify_univ_module_bootstrap(void); /* suppress gcc -Wmissing-decl warning */
 void sys_init_unify_univ_module_bootstrap(void) {
 	unify_univ_module_bootstrap();
Index: runtime/mercury_memory_zones.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory_zones.c,v
retrieving revision 1.7
diff -u -d -r1.7 mercury_memory_zones.c
--- runtime/mercury_memory_zones.c	1999/10/18 15:46:57	1.7
+++ runtime/mercury_memory_zones.c	1999/11/14 22:07:50
@@ -159,7 +159,7 @@
 } /* end init_offsets() */
 
 
-MemoryZone *
+static MemoryZone *
 get_zone(void)
 {
 	MemoryZone *zone;
@@ -183,7 +183,7 @@
 	return zone;
 }
 
-void 
+static void 
 unget_zone(MemoryZone *zone)
 {
 	MemoryZone *prev, *tmp;

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list