[m-dev.] trivial diff: add `const' in boehm_gc

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Oct 7 21:21:15 AEST 1999


Estimated hours taken: 0.25

boehm_gc/gc.h:
boehm_gc/dbg_mlc.c:
	Add `const' in a few places, to avoid warnings with
	`gcc -Wwrite-strings'.

Workspace: /d-drive/home/hg/fjh/mercury
Index: boehm_gc/dbg_mlc.c
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/dbg_mlc.c,v
retrieving revision 1.9
diff -u -r1.9 dbg_mlc.c
--- boehm_gc/dbg_mlc.c	1999/09/16 20:04:24	1.9
+++ boehm_gc/dbg_mlc.c	1999/10/04 20:55:30
@@ -343,10 +343,10 @@
 }
 
 # ifdef GC_ADD_CALLER
-#   define EXTRA_ARGS word ra, char * s, int i
+#   define EXTRA_ARGS word ra, const char * s, int i
 #   define OPT_RA ra,
 # else
-#   define EXTRA_ARGS char * s, int i
+#   define EXTRA_ARGS const char * s, int i
 #   define OPT_RA
 # endif
 
Index: boehm_gc/gc.h
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/gc.h,v
retrieving revision 1.25
diff -u -r1.25 gc.h
--- boehm_gc/gc.h	1999/09/16 20:04:25	1.25
+++ boehm_gc/gc.h	1999/10/04 21:20:26
@@ -346,10 +346,10 @@
 
 #ifdef GC_ADD_CALLER
 #  define GC_EXTRAS GC_RETURN_ADDR, __FILE__, __LINE__
-#  define GC_EXTRA_PARAMS GC_word ra, char * descr_string, int descr_int
+#  define GC_EXTRA_PARAMS GC_word ra, const char * descr_string, int descr_int
 #else
 #  define GC_EXTRAS __FILE__, __LINE__
-#  define GC_EXTRA_PARAMS char * descr_string, int descr_int
+#  define GC_EXTRA_PARAMS const char * descr_string, int descr_int
 #endif
 
 /* Debugging (annotated) allocation.  GC_gcollect will check 		*/

-- 
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