unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Subject: Re: compilation warnings
Date: Mon, 22 Sep 2003 17:58:36 -0400	[thread overview]
Message-ID: <m3he347ae5.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <87y8yjq56w.fsf@zagadka.ping.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 460 bytes --]

Here's a patch to silence some warnings produced by -Wwrite-strings.
(I only used -Wwrite-strings while compiling a Guile extension, not
Guile itself.  Using -Wwrite-strings for Guile itself would likely
produce lots more similar warnings, but none of them should be too
hard to fix.)

	* goops.c, objects.h, smob.c, smob.h: Make type names char
        const * instead of char *.

BTW, what version of auto* should be used to build/test CVS checkouts?


paul

[-- Attachment #2: guile-const.patch --]
[-- Type: text/x-patch, Size: 2535 bytes --]

Index: libguile/goops.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/goops.c,v
retrieving revision 1.71
diff -u -r1.71 goops.c
--- libguile/goops.c	18 Sep 2003 20:55:40 -0000	1.71
+++ libguile/goops.c	22 Sep 2003 21:48:05 -0000
@@ -2435,7 +2435,7 @@
  **********************************************************************/
 
 static SCM
-make_class_from_template (char *template, char *type_name, SCM supers, int applicablep)
+make_class_from_template (char const *template, char const *type_name, SCM supers, int applicablep)
 {
   SCM class, name;
   if (type_name)
@@ -2462,7 +2462,7 @@
 }
 
 SCM
-scm_make_extended_class (char *type_name, int applicablep)
+scm_make_extended_class (char const *type_name, int applicablep)
 {
   return make_class_from_template ("<%s>",
 				   type_name,
Index: libguile/objects.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/objects.h,v
retrieving revision 1.41
diff -u -r1.41 objects.h
--- libguile/objects.h	5 Apr 2003 19:10:22 -0000	1.41
+++ libguile/objects.h	22 Sep 2003 21:48:05 -0000
@@ -197,7 +197,7 @@
 SCM_API SCM scm_no_applicable_method;
 
 /* Goops functions. */
-SCM_API SCM scm_make_extended_class (char *type_name, int applicablep);
+SCM_API SCM scm_make_extended_class (char const *type_name, int applicablep);
 SCM_API void scm_i_inherit_applicable (SCM c);
 SCM_API void scm_make_port_classes (long ptobnum, char *type_name);
 SCM_API void scm_change_object_class (SCM, SCM, SCM);
Index: libguile/smob.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/smob.c,v
retrieving revision 1.58
diff -u -r1.58 smob.c
--- libguile/smob.c	18 Sep 2003 20:55:40 -0000	1.58
+++ libguile/smob.c	22 Sep 2003 21:48:05 -0000
@@ -269,7 +269,7 @@
 \f
 
 scm_t_bits 
-scm_make_smob_type (char *name, size_t size)
+scm_make_smob_type (char const *name, size_t size)
 #define FUNC_NAME "scm_make_smob_type"
 {
   long new_smob;
Index: libguile/smob.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/smob.h,v
retrieving revision 1.48
diff -u -r1.48 smob.h
--- libguile/smob.h	5 Apr 2003 19:10:22 -0000	1.48
+++ libguile/smob.h	22 Sep 2003 21:48:05 -0000
@@ -30,7 +30,7 @@
 
 typedef struct scm_smob_descriptor
 {
-  char *name;
+  char const *name;
   size_t size;
   SCM (*mark) (SCM);
   size_t (*free) (SCM);

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

  parent reply	other threads:[~2003-09-22 21:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-04  4:36 compilation warnings Paul Jarc
2003-07-27 16:56 ` Marius Vollmer
2003-07-28 22:37   ` Kevin Ryde
2003-09-22 21:58   ` Paul Jarc [this message]
2003-09-23  4:22     ` Rob Browning
2003-09-23 16:19       ` Paul Jarc
2003-09-24  6:11         ` Rob Browning
2003-10-07 16:00     ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3he347ae5.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).