Constify some commands in cli-cmds.c
authorTom Tromey <tom@tromey.com>
Sun, 10 Sep 2017 03:37:20 +0000 (21:37 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 27 Sep 2017 14:44:30 +0000 (08:44 -0600)
gdb/ChangeLog
2017-09-27  Tom Tromey  <tom@tromey.com>

* cli/cli-cmds.c (show_version, show_configuration)
(source_command, show_user): Constify.

gdb/ChangeLog
gdb/cli/cli-cmds.c

index 2f3ca4844254115de8470146e4b3e35ce8f593aa..f40b3c2d1e3b37cbcd26d755e4159f0c808a4920 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-27  Tom Tromey  <tom@tromey.com>
+
+       * cli/cli-cmds.c (show_version, show_configuration)
+       (source_command, show_user): Constify.
+
 2017-09-27  Tom Tromey  <tom@tromey.com>
 
        * target.c (maintenance_print_target_stack): Constify.
index 67910be2e51343c750aed23c954451c4981aecfb..c522df9d41285cad2ae165b40f54199dbedb194d 100644 (file)
@@ -66,8 +66,6 @@ static void echo_command (char *, int);
 
 static void pwd_command (char *, int);
 
-static void show_version (char *, int);
-
 static void help_command (char *, int);
 
 static void show_command (char *, int);
@@ -78,8 +76,6 @@ static void show_debug (char *, int);
 
 static void set_debug (char *, int);
 
-static void show_user (char *, int);
-
 static void make_command (char *, int);
 
 static void shell_escape (const char *, int);
@@ -343,14 +339,14 @@ is_complete_command (struct cmd_list_element *c)
 }
 
 static void
-show_version (char *args, int from_tty)
+show_version (const char *args, int from_tty)
 {
   print_gdb_version (gdb_stdout);
   printf_filtered ("\n");
 }
 
 static void
-show_configuration (char *args, int from_tty)
+show_configuration (const char *args, int from_tty)
 {
   print_gdb_configuration (gdb_stdout);
 }
@@ -645,9 +641,9 @@ source_script (const char *file, int from_tty)
 }
 
 static void
-source_command (char *args, int from_tty)
+source_command (const char *args, int from_tty)
 {
-  char *file = args;
+  const char *file = args;
   int search_path = 0;
 
   scoped_restore save_source_verbose = make_scoped_restore (&source_verbose);
@@ -1310,7 +1306,7 @@ make_command (char *arg, int from_tty)
 }
 
 static void
-show_user (char *args, int from_tty)
+show_user (const char *args, int from_tty)
 {
   struct cmd_list_element *c;
   extern struct cmd_list_element *cmdlist;
This page took 0.033459 seconds and 4 git commands to generate.