This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]