Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@science.uva.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Make maint.c:match_substring const-correct
Date: Thu, 27 Dec 2001 07:38:00 -0000	[thread overview]
Message-ID: <200112271537.fBRFbfH35990@elgar.my.domain> (raw)

Fixes a warning on FreeBSD 4.4.  Checked in as obvious.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* maint.c (match_substring): Make parameters `string' and `substr'
	const.  Make local variable `tok' const.

2001-12-27  Mark Kettenis  <kettenis@gnu.org>

Index: maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.19
diff -u -p -r1.19 maint.c
--- maint.c 2001/12/21 17:30:02 1.19
+++ maint.c 2001/12/27 15:36:43
@@ -189,10 +189,10 @@ maintenance_info_command (char *arg, int
 /* Mini tokenizing lexer for 'maint info sections' command.  */
 
 static int
-match_substring (char *string, char *substr)
+match_substring (const char *string, const char *substr)
 {
   int substr_len = strlen(substr);
-  char *tok;
+  const char *tok;
 
   while ((tok = strstr (string, substr)) != NULL)
     {


             reply	other threads:[~2001-12-27 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-27  7:38 Mark Kettenis [this message]
2001-12-27 11:34 ` Michael Snyder

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

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

  git send-email \
    --in-reply-to=200112271537.fBRFbfH35990@elgar.my.domain \
    --to=kettenis@science.uva.nl \
    --cc=gdb-patches@sources.redhat.com \
    /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