This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Make maint.c:match_substring const-correct
- From: Mark Kettenis <kettenis at science dot uva dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 27 Dec 2001 16:37:41 +0100 (CET)
- Subject: [PATCH] Make maint.c:match_substring const-correct
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)
{